Reputation: 196
while creating a module we inject our dependencies after our modulename in[].Here am asking is there any possible way to inject our modules other than this way?
Upvotes: 3
Views: 36
Reputation: 290
There is no other way to it. The only way is this.
However you can use $inject
when injecting controller dependencies.
See here : https://docs.angularjs.org/guide/di
Upvotes: 1
Reputation: 13997
You can add dependencies by using the requires
array:
var myApp = angular.module("myApp", []);
myApp.requires.push('newDependency');
Upvotes: 4