I have a mock server that respond with some data
backendMock.run(function($httpBackend){
$httpBackend.whenGET('views/login.html').passThrough();
$httpBackend.whenGET('views/home.html').passThrough();
$httpBackend.whenGET('views/quote.html').passThrough();
var quotes = [{quote:'aint bout how hard you hit'}];
$httpBackend.whenGET('/quotes').respond(quotes);
});
to fetch the data from this mock server I am using $http service
app.controller("quoteCtrl",['$scope','$stateParams','$http',function($scope,$stateParam,$http){
$scope.myquote=$stateParam.id;
$http.get('/quotes').success(function(data){
alert(data.quote);
});
}]);
Problem is I am able to hit the server but I am not getting any data back