Good morning everyone!
I'm trying to do a function with $ location.path ('/ main'); and when the function ischamo, the following message appears in the console:
TypeError: Can not read property 'path' of undefined
Why this?
.controller('loginCtrl', ['$scope', '$stateParams', function ($scope, $stateParams, $http, $location) {
$scope.fazerLogin = function(usuario){
/*$http.post("", usuario).success(function(data){
});*/
$location.path('/main');
}
}])