Open NetanelBasal opened 8 years ago
There is a way like in ui-router to add a global hook that's run on state change/success? This is very useful for example for Google analytics you need to do this:
$rootScope.$on('$stateChangeSuccess', function( event, toState, toParams, fromState, fromParams ) { ga('send', 'pageview', $location.path()); });
There is a way like in ui-router to add a global hook that's run on state change/success? This is very useful for example for Google analytics you need to do this: