angular - ng-if - how to callback after ng-if template has been rendered

前端 未结 4 1241
再見小時候
再見小時候 2021-02-18 18:47

in Angular, I need to call a function after an element with certain class has been loaded. Display of the element is controlled via ng-if=\'expr\'. Value of $scope.expr is set a

4条回答
  •  旧时难觅i
    2021-02-18 19:16

    Simplest solution in my view is to do the following:

    Your callback will be called only when what is affected by ng-if has been rendered.

提交回复
热议问题