【发布时间】:2016-06-27 14:34:49
【问题描述】:
我有一个剑道窗口,我试图从 Angular 指令访问;具体来说,我希望能够将消息传递给窗口并使用它(作为弹出窗口),但我无法处理它。我尝试以与传递 $filter/$timeout 相同的方式将它作为参数传递给指令(见下文),并且我尝试使用如下代码直接访问它:
var alertMessageWindow = element.find("#customWindow");
或
var alertMessageWindow = jQuery(element).find('#customWindow');
我绝对是 Angular 指令的新手;到目前为止,我正在使用的那个工作正常;我只是无法访问剑道窗口。
这是我正在使用的代码的基础:
<div kendo-window="customWindow"
k-options="customWindowOptions">
</div>
appModule.directive("myDirective",['$filter','$timeout',
function($filter, $timeout){
return {
restrict:'A',
scope:{
number:'=',
max:'=?',
min:'=?'
},
link: function(scope, element, attr) {
//access kendo-window here
}
};
}]);
【问题讨论】:
标签: javascript angularjs kendo-ui