Sometimes we need to access the attributes of event invoking DOM element. AngularJS proving $event directive to track events. we can find event invoking elements by using $event.target
Program Flow
- Pass $event while calling function
- Get element by using $event.target
- Make different type element operations like here
Program
$scope.displayHtml = function($event) { var myEl = angular.element($event.target); alert(myEl.html()); }
I love this. It is soo informative. Are you also searching for cheap assignment writing services we are the best solution for you. We are best known for delivering the best services to students without having to break the bank
ReplyDelete