angularjs - How toc change class in element Angular JS? -
i have html code:
<span id="id_1" ng-click="checkactivity(1)" class="item list-category-item active ">bga </span> how change css class of element inside:
$scope.checkactivity = function(id){}
modify ng-click ng-click="checkactivity($event)"
, function definition
$scope.checkactivity = function(evt) { angular.element(evt.currenttarget).addclass('myclass'); }; working demo here
Comments
Post a Comment