Call Angular Function with Jquery

前端 未结 7 1853
遇见更好的自我
遇见更好的自我 2020-12-04 21:59

How to call angular function when data in text box? here is my code

html




        
7条回答
  •  甜味超标
    2020-12-04 22:22

    if you use in your code something like this

    instead of

    the access will be

    angular.element('#mycontroller').scope().child.myFunction();
    

    instead of

    angular.element('#mycontroller').scope().myFunction();
    

    in every case you also need the call

    angular.element('#mycontroller').scope().$apply();
    

提交回复
热议问题