I'm building a basic AngularJS Login page and the $window.location.href did not re-direct the page to a new html in my system, hosted by WAMP. I even tried re-directing it to google. Nothing happens. I tried all the available solutions here and nothing seems to work. Any solutions ?
JS followed by HTML
In angular js you can use $location
. Inject it in your controller :
app.controller('MainCtrl', function($scope, $location) { ... }
And if you want to redirect to google use its url()
method :
$location.url('http://google.fr');
you can also use path()
method for relative url :
$location.path('home'); // will redirect you to 'yourDomain.xx/home'