AngularJS: callback after render (work with DOM after render)

前端 未结 5 821
长发绾君心
长发绾君心 2020-12-08 02:26

How can run a method $scope.myWork() after render template? I want to set the $scope.value and after that I need to change something with JQuery (e

5条回答
  •  有刺的猬
    2020-12-08 03:21

    Create a directive that runs your code in the link function. The link function is called after the template is built.

    See ng-click to get an idea.

提交回复
热议问题