Within my angular web application,
$routeProvider
.when('/topic/:keyword/heath-feed', {
controller: 'hfController',
})
.when('/topic/:keyword/heath-feed/:storyType', {
controller: 'hfController',
})
When configuring the above routes using ng-route, the events $routeChangeStart and $routeChangeSuccess are triggered as expected for '/topic/:keyword/heath-feed'. However, these events are not triggered for '/topic/:keyword/heath-feed:storyType' route. I even added an additional $routeChangeError block to troubleshoot any potential resolution issues, but it also remains untriggered.
This issue occurs both with internal routing and when landing on the page directly or reloading it.
$rootScope.$on('$routeChangeError', function(event, current, previous, rejection) {
...
})
$rootScope.$on("$routeChangeSuccess", function(event, next, current) {
...
});
$rootScope.$on("$routeChangeStart", function (event, next, current) {
...
});
These are the route listeners that I have implemented.
Any suggestions on how to resolve this issue?