I am using $http.get
. All injections seems to be in place but I am getting error:
TypeError: Cannot read property 'get' of undefined
.
UPDATED
app.controller("MyCtrl", ['$scope', '$state', '$http', function ($scope, $state, $http) {
$scope.getEntryStateUrl = function(apiUrl){
$http.get(apiUrl).success(function(data){/*...*/}));
}
}
UPDATE:
Thanks for pointing out about success
and injection. Now I am facing this problem.