Why widget names and options have to be in lower case for declarative initialization?

4 posts, 0 answers
  1. Olivier
    Olivier avatar
    14 posts
    Member since:
    Feb 2011

    Posted 10 Dec 2013 Link to this post

    Hello!

    Today I started to work on my first Kendo widget. After many hours trying to understand why the declarative initialization wasn't working, I realized that this works:

    <div id="youtube" data-role="youtube" data-templatename="template"></div>
    But this doesn't (even if the name of the widget is YouTube and the name of the option in the widget definition is templateName).

    <div id="youtube" data-role="YouTube" data-templateName="template"></div>

    I would like to understand the reason. Probably I didn't read the documentation well enough.

    Just wanted to share my experience after a whole day debugging this problem :)
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 12 Dec 2013 Link to this post

    Hi Olivier,

    We  have adopted this naming convention for our widgets, and it is written in this documentation article where data-attribute initialization is explained:

    http://docs.kendoui.com/getting-started/data-attribute-initialization

    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Olivier
    Olivier avatar
    14 posts
    Member since:
    Feb 2011

    Posted 12 Dec 2013 Link to this post

    Something new that I learned about Kendo!

    Just a recommendation: It would be helpful to add that information to the articles where the process of creating a new widget is explained.

    Thanks.
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 14 Dec 2013 Link to this post

    Hello Olivier,

    Thank you very much for your suggestion. We will consider adding this information in the articles that you suggested.

    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top