AngularJS Directive Callback

前端 未结 2 1641
无人及你
无人及你 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:18

    Also the callback needs to be:

    scope.onLoadCallback({arg1: 'wtf'});
    

    The named parameters are then bound to the corresponding parameters used in the callback attribute (not all need to be used).

提交回复
热议问题