angularjs - Trigger onChange event of Kendo Editor widget -


suppose have following kendo-editor:

<div kendo-editor ng-model="name" k-options="editoroptions"></div> 

then, have following editoroptions:

function onchange(e) {    alert("i changing."); } $scope.editoroptions = { change: onchange }; 

how can access actual kendo-editor object me trigger onchange event without using normal jquery selection:

example: $("#myeditor").kendoeditor().trigger("change")

you must define control reference in current scope (http://docs.telerik.com/kendo-ui/angularjs/introduction#getting-widget-references) , can define events attribute:

<div ng-app="app" ng-controller="myctrl">   <div kendo-editor="kendoeditorcontrol" ng-model="name" k-options="editoroptions" k-on-change="onchange()"></div> </div> <script>   angular.module("app", [ "kendo.directives" ]).controller("myctrl", function($scope) {     $scope.onchange = function() {      alert($scope.kendoeditorcontrol.value());     };   }); </script> 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -