内置指令和内置事件

时间:2015-01-31 14:22:14   收藏:0   阅读:126

<div ng-include="‘other.html‘"></div>

<div ng-include src="‘other.html‘"></div>

<button ng-click=‘changeStaus($event)‘>点击</button>

$scope.changeStaus=function(event){

  angular.element(event.target).html(‘点击改变按钮文字‘);angular.element()方法可以把dom对象转换为jquery对象

}

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!