Right so I have a little dilemma here :).
I'm working on a project that is built with angularjs and Laravel. Login is done with laravel which is out of AngularJs "scope", should I say.
So in Front End I do not see that page.
What I'm trying to do is use $http get method to get /logout (handled by laravel again). On success redirect user to /login.
So what I was thinking of doing is:
$rootScope.logout = function () {
$http.get('/logout', function (response) {
console.log('redirect');
$window.location.href('/login');
});
};
But doesn't seem to work for some reason. Suggestions? /logout clears all sessions etc, which is out of my "jurisdiction" :)
Btw I'm also using UI-router.