I am trying to get the angularjs service from Plain Javascript. I am using the below syntax.
angular.injector(['ng', 'error-handling']).get("messagingService").GetName();
When messagingservice does not contain any dependency this is working fine. When the messagingservice contains
.service('messagingService', ['$rootScope', 'applicationLogService', 'dialogService', MessageService])
then I am getting Unknown provider: dialogServiceProvider <- dialogService <- messagingService error. I have included the js file for dialogservice already. Can any one help where I am missing ? Is there any other syntax need to be followed in getting service with dependency?