首页 > 代码库 > ng-repeat创建的元素实现单个点击选中

ng-repeat创建的元素实现单个点击选中

html

<div ng-repeat="a in b" ng-click="click(a)" na-class="{{‘classname‘:data =http://www.mamicode.com/==‘xxx‘}}"></div>

 

controller

$scope.data = http://www.mamicode.com/resp.xxxx;

$scope.click=function(e){

  console.log(e);

}

ng-repeat创建的元素实现单个点击选中