совсем не очевидно мне(
Uncaught TypeError: $httpBackend.when is not a functio
$stateProvider
.state('user', {
url: '/user/:id',
controller: 'Profile',
controllerAs: 'vm',
templateUrl: 'app/user/templates/profile.html'
});
var service = {
getAll: getAll
};
return service;
function getAll(data) {
var url = '/user/' + data.userID;
return $http({
url: url,
method: "GET"
})
.then(complete)
.catch(function (message) {
$location.url('/');
});
}
$httpBackend.whenGET('/user/:id').respond(200, {message: "Hello world"});