Im using angularJS to set where i want the page to go after i login, but if i only have this
function routeProviderFunction($routeProvider){
$routeProvider.when('/default',{
templateUrl: 'HTML/login.html',
controller: funct2
});
$routeProvider.otherwise({
redirectTo: '/default'
});
}
My route provider works in the above code, but after i turn it into this
function routeProviderFunction($routeProvider){
$routeProvider.when('/default',{
templateUrl: 'HTML/login.html',
controller: funct2
});
$routeProvider.when('/adminMenu/:username', {
templateUrl: 'HTML/adminMenu.html',
controller: adminMenu
});
$routeProvider.otherwise({
redirectTo: '/default'
});
}
My route provider ceases to work at all. Any ideas
try to do like this:
$routeProvider
.when('/default', {
templateUrl: 'HTML/login.html',
controller : 'funct2'
}).when('/adminMenu/:username', {
templateUrl: 'HTML/adminMenu.html',
controller : 'adminMenu'
}).otherwise({
redirectTo : '/default'
});