blob: 28a590627042328e2cc9da6dbf1f79d8b7ad7155 [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('');
Matteo Scandolo9b460042017-04-14 16:24:45 -07008 $urlRouterProvider.otherwise('/loader');
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08009
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
Matteo Scandolo9b460042017-04-14 16:24:45 -070013 .state('loader', {
14 url: '/loader',
15 component: 'xosLoader',
16 data: {
17 specialClass: 'blank'
18 }
19 })
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080020 .state('xos', {
21 abstract: true,
22 url: '/',
23 component: 'xos'
24 })
25 .state('xos.dashboard', {
Matteo Scandolo9b460042017-04-14 16:24:45 -070026 url: 'dashboard',
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080027 parent: 'xos',
Matteo Scandolod62ea792016-12-22 14:02:28 -080028 template: '<xos-dashboard></xos-dashboard>'
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080029 })
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -080030 .state('xos.core', {
31 url: 'core',
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080032 parent: 'xos',
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -080033 abstract: true,
Matteo Scandolo1aee1982017-02-17 08:33:23 -080034 template: '<div ui-view></div>'
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080035 });
36}