阅读背景:

AngularJS多个指令元素,带有模板和控制器广播

来源:互联网 

I have a directive element with a template. The directive template contains a button with an ng-click to call a function in a controller. When the button is clicked, the controller broadcasts an event and the directives look for the broadcast. This works great, however, I'm getting an alert for each directive element being used in the app. I just want the broadcast to be listened by the directive element being used to click the button.I have a directive element with a template. The




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: