AngularJS Express component to add a custom ui-router state change event handler.
This components contains event handlers for:
$stateChangeStart
$stateChangeSuccess
$stateChangeError
To install the component:
$ ngx install angular-ui-router-state-change-event-handler
To install specific handlers, you can install multiple components:
$ ngx install angular-ui-router-state-change-event-handler src/components/handle-errors
$ ngx install angular-ui-router-state-change-event-handler src/components/secure-private-states
and edit/remove listeners from the individual handlers.
No clue what the ngx
command line tool is? Learn more about AngularJS Express.
After installing the component:
- edit
_build/register-state-change-event-handler.js
- add your custom logic
and import the component in your Angular application:
// Angular main module
var ngModule = angular.module('app', []);
// Import component
import c from 'components/angular-ui-router-state-change-event-handler/_build/index';
// Instantiate component
c(ngModule, { baseUrl: 'components/angular-ui-router-state-change-event-handler' });
baseUrl
: Base URL that component can use to construct links
- Initial version