I keep getting this error even though i injected $http in my controller.
app.controller('myCtrl', ['$scope', '$http', function($scope, $http) {
$scope.user = {
name: '',
address: '',
email: '',
date: '',
time: '',
phone: '',
zipcode: 0,
};
}]);
and when i try to post an http
request on this code
$scope.reserve = function() {
$http.post('/user'
$scope.user).success(function(response) {
console.log(response);
});
}
It is giving me $http is not defined error.