ng-repeat建立的元素實現單個點擊選中

htmlhtml

<div ng-repeat="a in b" ng-click="click(a)" na-class="{{'classname':data ==='xxx'}}"></div>htm

 

controllerio

$scope.data = resp.xxxx;console

$scope.click=function(e){function

  console.log(e);class

}cli

相關文章
相關標籤/搜索