kendo-labs / angular-kendo

A project to create a robust set of Angular.js bindings for Kendo UI widgets
474 stars 209 forks source link

Angular-Kendo Docs? #367

Closed lombardi-gux closed 10 years ago

lombardi-gux commented 10 years ago

All of the docs included in this package are very limited and immediate send you off to the docs for non-angular versions of the components. I know how to set options for the components using jQuery, the "old" way, but how to set from inside the angular directives?

For example, with the slider, how to turn off ticks? I know how to do it in jQuery but is there a parameter in the slider definition on the page for this as there is for k-tooltip or k-orientation?

mwinkler commented 10 years ago

Sign! The docs really have to be improved.

mishoo commented 10 years ago

If you know how to do it with jQuery, then you know how to do it with Angular. All options supported with plain jQuery are supported as attributes with Angular-Kendo, by converting the option name from camelCase to dash-separated-words, and prefixing it with k-. Also, if you need to pass a string literal value to an option you need to embed it in single-quotes, because otherwise it will be interpreted as a variable reference in $scope. All this is actually documented.

So, to hide the ticks in a slider you'd do this:

<div kendo-slider k-tick-placement="'none'"></div>
<!-- again, notice these quotes     ^    ^ -->
smlombardi commented 10 years ago

Thanks.

All this is actually documented.

Can you please point me to this?

mishoo commented 10 years ago

@smlombardi hm, you are right. Sorry, my bad. I'm sure it was written once, but it got lost somehow. I'll update the docs to clarify the options passing.