Trying to access the AngularJS service from plain JavaScript. Utilizing the following syntax:
angular.injector(['ng', 'error-handling']).get("messagingService").GetName();
It works fine when the messagingservice has no dependencies. However, an issue arises when the messagingservice contains:
.service('messagingService', ['$rootScope', 'applicationLogService', 'dialogService', MessageService])
This results in an error saying
Unknown provider: dialogServiceProvider <- dialogService <- messagingService
. The js file for dialogservice is already included. Can anyone provide insight into what might be missing? Is there a different syntax required for accessing a service with dependencies?