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 , link
option.
app.directive('somecssclass', function () { return { restrict: 'c', link: function inithandler(scope, element, attrs){} }; });
Comments
Post a Comment