How to add css class and remove css class in Angularjs?

activeTab=function(TabName) { if (TabName == “lnkHome”) { angular.element(document.getElementById(TabName)).removeClass(“tab-inactive”); angular.element(document.getElementById(TabName)).addClass(“tab-active”); angular.element(document.getElementById(‘lnkAbout’)).removeClass(“tab-active”); angular.element(document.getElementById(‘lnkAbout’)).addClass(“tab-inactive”); angular.element(document.getElementById(‘lnkContact’)).removeClass(“tab-active”); angular.element(document.getElementById(‘lnkContact’)).addClass(“tab-inactive”); } else if (TabName == “lnkAbout”) {[…]

Read more