Note angular declare injection

Sol1: use array

angular.module(‘app.services’, [])
.service(‘BlankService’, [function () {
}]);

If use this solution, when you wanna inject some variable you have to inject in array also

angular.module(‘app.services’, [])
.service(‘BlankService’, [‘$http’, function ($http) {
}]);

Sol2: not use array

angular.module(‘app.services’, [])
.service(‘BlankService’, function () {
});

If use this, when you wanna inject variable just inject into function

angular.module(‘app.services’, [])
.service(‘BlankService’, function ($http) {
});
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.