Encountering an issue with the error message "this.path is not a function"
The code does not contain any reference to "this.path", leading me to believe it may be related to the state. However, I am having trouble pinpointing the exact problem. The error message reads:
stateService.ts:530 TypeError: this.path is not a function
at LocationHtml5Url.url (angular.js:13744)
at Object.coreservices_1.services.location.setUrl (services.ts:209)
at UrlRouter.push (urlRouter.ts:376)
at updateUrl (url.ts:24)
at TransitionHook.invokeHook (transitionHook.ts:44)
at TransitionHook.runSynchronousHooks (transitionHook.ts:108)
at transitionSuccess (transition.ts:507)
at processQueue (angular.js:16832)
at angular.js:16876
at Scope.$digest (angular.js:17971)
This error seems to originate from a nested angular state routing process (considering no typescript is used). It occurs during route changes, post resolve but prior to controller loading.
Despite the error popping up, the subsequent page does load successfully (confirmed by console.log triggering in the controller).
If relevant, the suspected problematic section in my code before the error is encountered (part of a large state resolve for a parent routing system) is as follows:
currentProfile: function($rootScope, UserProfileService) {
return UserProfileService.fetchClientProfile().then(function(profile) {
console.log(profile)
$rootScope.user = {
name: profile.fullName || profile.firstName
};
return profile;
});
}