javascript - Adding ngInit to all the elements with specified css class -


i have single page application (angularjs + angular-ui-router) , there many elements 'somecssclass'.

i need add global handler (at window object), handles these elements init event. there way this, except manually adding nginit (or this) each element in each view?

i end directive , linkoption.

app.directive('somecssclass', function () {  return {   restrict: 'c',   link: function inithandler(scope, element, attrs){}  }; }); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -