Here is the app.js of my project:
(function () { \'use strict\'; angular .module(\'app\', [\'ui.router\', \'ngCookies\', \'angular-inview\', \'ngMateria
Well, thanks to @Vanojx1, I found out adding e.preventDefault(); before the $state.go('login'); made it work. Still dont understand why though.
e.preventDefault();
$state.go('login');