查看更改类:如何利用点击徘徊
<a ng-repeat="control in controls | filter:name" ng-href="#{{control.id}}" ng-click="restart(control.name)" ng-class="{active: control.name == selected}">{{control.name}}
控制器 - app.js
$scope.restart = function (controlName) {
$scope.selected = controlName;
}
在这里,我已经添加了活动类,而clicking.how我可以使用鼠标悬停添加悬停类,并使用鼠标移开类。
使用'ngMouseover'和'ngMouseleave' – AranS
我used..but我想添加活动类,同时点击。我想添加添加'悬停'类,而徘徊。 –