AngularJS Directive Callback

前端 未结 2 1642
无人及你
无人及你 2020-12-14 18:30

I would like to send a call back into a directive via a parameter on the tag, and then call that method when appropriate inside the directive. For example, when a button was

2条回答
  •  悲&欢浪女
    2020-12-14 19:08

    Tricky tricky angular, when declaring the argument in the HTML, it needs to use snake case, instead of camelcase to match.

    Works:

    
    

    Doesn't Work:

    
    

提交回复
热议问题