In this blog we will see how easy is to get HTML element in AngularJS. We many a times stuck in situation where we need to get HTML element that are not bind to AngularJS Model. Here is quick and easiest way of doing that.
Using Class Name:
var elem = angular.element(document.querySelector(".ClassName"));
Using Id:
var elem = angular.element(document.querySelector("#Id"));
Using this can help in getting the HTML element in AngularJS.
0 Comment(s)