0
For example, on the routes below:
app.config(function($routeProvider){
$routeProvider.when('/dashboard', {
templateUrl: "../views/dashboard.html",
controller : "dashboardCtrl"
}).when('/cadastro', {
templateUrl: "../views/signin.html",
controller : "signInCtrl"
}).otherwise({
redirectTo : '/login'
});
})
I use the otherwise
for /login
, which has as consequence the route:
http://www.myapp.com/rotaAtual/#/login
Since it is the standard route of sigle page application, but in case I want to switch to a route like:
http://www.myapp.com/login
it is possible?
Thank you.
Thanks, it worked as well as I wanted. But, one thing, it only works with the template statement?
– Samir Braga
Dude, I ask you the same question above, why did you use the
template
? What does it mean in this situation? Links?– Christian Felipe