You can certainly inject $http
to provider. Just make sure it appears in $get
, not the function constructor. As follows:
angular.module('greet',[]).provider('greeter',function() {
this.$get = function($http) {
};
});
You can certainly inject $http
to provider. Just make sure it appears in $get
, not the function constructor. As follows:
angular.module('greet',[]).provider('greeter',function() {
this.$get = function($http) {
};
});