<! DOCTYPE html>. gimg{width:50px;height:50px;} . goodsone{float: Left;} . Goodsone H1{cursor:pointer}. Goodsone h1.selected{border:1px solid #ccc; background-color: #C00;} </style>if= "$index! = 0" >{{x.title}}if= "$index = = 0" >{{x.title}}varApp = Angular.module (' MyApp1 ', []); App.controller (' MyCtrl1 ',function($scope) {$scope. Allgoods=[{title:' Heading 1 ', goods: [{ID:' 1 ', Name:' Jani ', Country:' Norway ', Price:"1.00", IMG:' Https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png '}, {ID:' 2 ', Name:' Hege ', Country:' Sweden ', Price:"2.00", IMG:' Http://p0.meituan.net/avatar/1dff8c38406d4d6b6540c69503f409d357171.jpg '}, {ID:' 3 ', Name: ' Kai ', Country: ' Denmark ', Price: ' 3.00 ', img: ' http://up.qqjia.com/z/25/tu32695_9.jpg '}]}, {title:' Heading 2 ', goods: [{ID:' 2 ', Name:' Jani222 ', Country:' China ', Price:"6.00", IMG:' Http://desk.fd.zol-img.com.cn/t_s960x600c5/g5/M00/01/0E/ChMkJlbKwaOIN8zJAAs5DadIS-IAALGbQPo5ngACzkl365.jpg '}, {ID:' 6 ', Name:' Sk ', Country:' Sweden2 ', Price:"5.00", IMG:' Http://cdn.duitang.com/uploads/item/201610/20/20161020070310_c5xWi.jpeg '}, {ID:' 3 ', Name: ' Kai ', Country: ' Denmark ', Price: ' 3.00 ', img: ' http://up.qqjia.com/z/25/tu32695_9.jpg '}]}, {title:' Heading 3 ', goods: [{ID:' 4 ', Name:' OOMD ', Country:' Yuena ', Price:"63.00", IMG:' Https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png '}, {ID:' 6 ', Name:' JKHD ', Country:' Mmlld ', Price:"25.00", IMG:' Http://p0.meituan.net/avatar/1dff8c38406d4d6b6540c69503f409d357171.jpg '}, {ID:' 3 ', Name: ' Kai ', Country: ' Denmark ', Price: ' 3.00 ', img: ' http://up.qqjia.com/z/25/tu32695_9.jpg ' } ] } ]; $scope. Mycurrent=0; $scope. Toggle=function(event,indexnow) {varclickele=angular.element (Event.target); //angular.element (Document.queryselector (". Goodsone H1")). Removeclass ("selected");Angular.element (document). Find (' H1 '). Removeclass ("Selected"); //alert (clickele);Clickele.addclass ("Selected"); $scope. Mycurrent=Indexnow; } });</script></body>Angular tab Switching (Loop output tab title and tab subordinate content, not direct, not include)