Does Kendo support k-ng-modeltwo-way binding, and if not, what is the best approach to simulate it?
A bit of context:
In angular, when the update for the ng model is complete, all interested parties are updated (for example, the view is updated). In kendo, when using the k-ng model, I cannot find a way to do the same where I would like to directly set the value from the controller / directive.
Here is an example: Dojo coding
And, just in case, the code:
<input kendo-auto-complete
k-ng-model="vm.kendoSelection"
ng-model="vm.angularSelection"
k-data-source="vm.countryNames"
k-data-value-field="'name'"
k-data-text-field="'name'" />
Sample Controller:
angular.module("MyApp", [ "kendo.directives" ])
.controller("Controller", function(){
this.countryNames = [
{ name: "Albania" },
{ name: "Andorra" }
];
this.kendoSelection = { name: "Albania" };
});
EDIT:
Even after the answer of Dion Dirza, k-on-change does not shoot (although this solution is in a good direction)
Example with k-on-change
Dion Deers
source
share