Routes fallback to content if set to default

This commit is contained in:
Per Ploug
2013-07-05 12:45:37 +02:00
parent fd1e647ca7
commit 4a83262e1f

View File

@@ -1,7 +1,12 @@
app.config(function ($routeProvider) {
$routeProvider
.when('/:section', {
templateUrl: function (rp) {
$routeProvider
.when('/:section', {
templateUrl: function (rp) {
if (rp.section === "default")
{
rp.section = "content";
}
rp.url = "dashboard.aspx?app=" + rp.section;
return 'views/common/legacy.html';
}
@@ -33,10 +38,13 @@ app.config(function ($routeProvider) {
})
.otherwise({ redirectTo: '/content' });
}).config(function ($locationProvider) {
//$locationProvider.html5Mode(false).hashPrefix('!'); //turn html5 mode off
// $locationProvider.html5Mode(true); //turn html5 mode on
//$locationProvider.html5Mode(false).hashPrefix('!'); //turn html5 mode off
// $locationProvider.html5Mode(true); //turn html5 mode on
});
app.run(['security', function (security) {
// Get the current user when the application starts
// (in case they are still logged in from a previous session)