I'm having an injection error when i try to use $http to get a value from an API on my app. I'm including both the code of the module definition and the function which calls the Web API and the error in the browser console.
angular.module('mod-1').controller('Controller', ['$scope','http', 'APICM', '$q', '$filter', '$timeout', 'AppSettings'$modal', 'Dialog', 'title',
function ($scope, $http, API, $q, $filter, $timeout, AppSettings, $modal, Dialog, title) {
$('.page-title').text(title);
function getActiveStore() {
$http.get("https://localhost:44300/api/store/active").success(
function (response) {
$scope.currentStore = response;
})
}
}
Error: Error: [$injector:unpr] http://errors.angularjs.org/undefined/$injector/unpr?p0=httpProvider%20%3C-%20http at Error (native) at https://localhost:44300/Scripts/vendor/angular.min.js:6:453 at https://localhost:44300/Scripts/vendor/angular.min.js:32:18 at Object.c [as get] (https://localhost:44300/Scripts/vendor/angular.min.js:29:147) at https://localhost:44300/Scripts/vendor/angular.min.js:32:86 at c (https://localhost:44300/Scripts/vendor/angular.min.js:29:147) at d (https://localhost:44300/Scripts/vendor/angular.min.js:29:324) at Object.instantiate (https://localhost:44300/Scripts/vendor/angular.min.js:30:482) at https://localhost:44300/Scripts/vendor/angular.min.js:59:495 at https://localhost:44300/Scripts/vendor/angular-route.min.js:6:446