Angularjs: Get element in controller

前端 未结 4 1839
暖寄归人
暖寄归人 2020-12-30 18:23

I am new to angularjs, I know that $scope represent a connection between the controller and the view, But is there a way besides looking for class=\"ng-sc

4条回答
  •  孤独总比滥情好
    2020-12-30 19:16

    You can pass in the element to the controller, just like the scope:

    function someControllerFunc($scope, $element){
    
    }
    

提交回复
热议问题