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

Difference between ng-model and k-ng-model. #374

Open Tntv opened 10 years ago

Tntv commented 10 years ago

Hi,

Could anyone please tell me what is the difference between ng-model and k-ng-model with angular-kendo. I see behavior changes when i interchange these. Unfortunately could not find any resource which explains them. Hence this question.

Best Regards, TNTV

ronak1790 commented 8 years ago

Hi ,

Sorry I am very late to reply on your question but my answer can help someone.

ng-model provide only value and you can bind that value to your scope.

For example if you you are using datepicker control of Kendo then it will get you only date value for you like "7/4/2016".

whereas,

k-ng-model provide you complete value as object and you can bind it to your scope.

For example if you are using datepicker control of Kendo then it will get you complete date value for you as object like "2016-07-12T05:00:00.000Z"

You can also refer to this link on Kendo Website @http://docs.telerik.com/kendo-ui/AngularJS/introduction