$rootScope.$on(“$routeChangeSuccess) or $rootScope.$on(”$stateChangeSuccess) does not work when using ui-router(AngularJS)
问题 I am using UI-router for nested views in my application but at the sametime I want to listen for events when the route changes. Before using UI-router routeChangeSuccess was firing just fine but after ui-router it does not fire. Documentation suggests to use viewContedLoaded or stateChangeSuccess to be used but even they dont get fired. I am pasting my code snippet. Any help would be appreciated. var app = angular.module('SmartKart', ['ngCookies','ngRoute','ui.bootstrap','angularPayments',