blob: 8685ce79f850b114815ec28125347b69054b8e29 [file] [log] [blame]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08001/// <reference path="../typings/index.d.ts" />
2
3export default routesConfig;
4
5/** @ngInject */
6function routesConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider, $locationProvider: angular.ILocationProvider) {
7 $locationProvider.html5Mode(false).hashPrefix('');
8 $urlRouterProvider.otherwise('/');
9
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -080010 // declare here static endpoints,
11 // core related endpoints are dynamically generated
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080012 $stateProvider
13 .state('xos', {
14 abstract: true,
15 url: '/',
16 component: 'xos'
17 })
18 .state('xos.dashboard', {
19 url: '',
20 parent: 'xos',
Matteo Scandolod62ea792016-12-22 14:02:28 -080021 template: '<xos-dashboard></xos-dashboard>'
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080022 })
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -080023 .state('xos.core', {
24 url: 'core',
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080025 parent: 'xos',
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -080026 abstract: true,
Matteo Scandolo1aee1982017-02-17 08:33:23 -080027 template: '<div ui-view></div>'
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080028 });
29}