阅读背景:

用指令范围参数调用指令父作用域上的函数

来源:互联网 

I am developing a directive which shows and hides it's contents based on a click event (ng-click) defined in it's template. On some views where the directive is used I'd like to be able to know if the directive is currently showing or hiding it's contents so I can respond to the DOM changes. The directive has isolated scope and I am trying to notify the parent scope when the directive has been "toggled". I'm attempting to accomplish this by passing a callback function to the directive where it is used that can be called when the directive's state changes i.e hides or showsI am developing a directive which shows and hid




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

分享到: