1
有人可以解释angulars背后的逻辑能够检测范围内的Kendo的点击事件没有NG模型的按钮?Angular如何检测Kendo点击事件?
$scope.clickWithoutNgModel = function() {
alert("Clicked without using ng-model on the button");
} // this works - how?
有人可以解释angulars背后的逻辑能够检测范围内的Kendo的点击事件没有NG模型的按钮?Angular如何检测Kendo点击事件?
$scope.clickWithoutNgModel = function() {
alert("Clicked without using ng-model on the button");
} // this works - how?
这是周围的其他方式,其实。 AngularJS没有检测到点击事件,但Kendo小部件调用了AngularJS控制器方法。
创建Kendo小部件时,Kendo代码将绑定clickWithoutNgModel
函数作为Kendo Button小部件中click event的事件处理函数。为此,它使用$scope.$eval
从范围中获取函数,然后在触发单击事件时调用它。