Call a controller function from a directive without isolated scope in AngularJS

前端 未结 4 2021
花落未央
花落未央 2020-11-29 16:47

I cannot seem to find a way to call a function on the parent scope from within a directive without using isolated scope. I know that if I use isolated scope I can just use \

4条回答
  •  -上瘾入骨i
    2020-11-29 17:31

    Explicitly call hideButton on the parent scope.

    Here's the fiddle: http://jsfiddle.net/pXej2/5/

    And here is the updated HTML:

提交回复
热议问题