Created
October 29, 2014 10:57
-
-
Save Sebfh/a71b47ad4fb20b01165e to your computer and use it in GitHub Desktop.
UI-Router problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$urlRouterProvider.when('/admin', '/admin/dashboard'); | |
$stateProvider | |
.state('root', { | |
abstract: true, | |
url: '', | |
views: { | |
'main-layout': { | |
templateUrl: '/views/layouts/main.html' | |
} | |
} | |
}) | |
.state('root.home', { | |
url: '/', | |
views: { | |
'header': { | |
templateUrl: '/views/shared/public.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/home/index.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}) | |
.state('root.news', { | |
url: '/news', | |
views: { | |
'header': { | |
templateUrl: '/views/shared/public.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/news/news.list.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}) | |
.state('root.information', { | |
url: '/information', | |
views: { | |
'header': { | |
templateUrl: '/views/shared/public.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/information/information.list.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}) | |
.state('root.admin', { | |
url: '/admin', | |
views: { // this is never shown. Should be solved different | |
'header': { | |
templateUrl: '/views/shared/admin.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/admin/dashboard.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}) | |
.state('root.admin.spotlight', { | |
url: '/spotlight', | |
views: { | |
'header': { | |
templateUrl: '/views/shared/admin.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/admin/spotlight.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}) | |
.state('root.admin.dashboard', { | |
url: '/dashboard', | |
views: { | |
'header': { | |
templateUrl: '/views/shared/admin.header.html' | |
}, | |
'main': { | |
templateUrl: '/views/admin/dashboard.html' | |
}, | |
'footer': { | |
templateUrl: '/views/footer/public.html' | |
} | |
} | |
}); | |
$locationProvider.html5Mode(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/admin/spotlight is not showing
/admin/dashboard is showing