i am working in AngularJs and i have a problem.
When the user push the login button, the page go back to the previous page, but i only want go back if one of the routeprovider page and go to "/" route if teh previous page is another page. Actualy i use:
if (history.length > 1)
{
history.back();
}
else
{
$location.url("/");
}
How can i see the previous page url and compare it?