ng-once
v0.3.0
Published
Adds $rootScope functionality to handle an event only once
Maintainers
Readme
ng-once
ng-once is a module that introduces $rootScope.$once. This allows an event handler to
be bound to an event, but it will be invoked only once.
Installation
Bower
$ bower install ng-once --savenpm
$ npm install ng-onceUsage
angular.module('demo').controller('DemoCtrl', function ($rootScope) {
$rootScope.$once('$routeChangeSuccess', function () {
// This function will be invoked on only the first $routeChangeSuccess
});
});