In JavaScript one can change class of an element like this
document.getElementById("MyElement").className = "MyClass";
What is the alternative for doing something similar in AngularJS function? I am getting an element by using
var myElement = angular.element( document.querySelector( '#MyElement' ) );
now is there any way to change class of var myElement? or is it possible to do something similar to myElement.style ?
ng-classbut that method is too lengthy. if there is an alternative for the method i asked above, it will be most efficient