angular.element

angular.module('myApp',[])
    .controller('firstController',function ($scope) {
         $scope.status=false;
         $scope.changeStatus=function (event) {

             $scope.status=! $scope.status;
             //通过element转换成jquery对象
             angular.element(event.target).html('切换状态为:'+$scope.status);

         };
       
    });

  

posted @ 2017-10-18 09:04  zhujhhxx  阅读(84)  评论(0编辑  收藏  举报