This is a migrated thread and some comments may be shown as answers.

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

3 Answers 16 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 1
Olivier asked on 11 Dec 2013, 12:51 AM
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 :)

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 12 Dec 2013, 04:14 PM
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!
0
Olivier
Top achievements
Rank 1
answered on 12 Dec 2013, 07:44 PM
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.
0
Kiril Nikolov
Telerik team
answered on 14 Dec 2013, 08:32 AM
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!
Tags
General Discussions
Asked by
Olivier
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Olivier
Top achievements
Rank 1
Share this question
or