Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 1 | /// <reference path="../typings/index.d.ts" /> |
| 2 | |
| 3 | export default routesConfig; |
| 4 | |
| 5 | /** @ngInject */ |
| 6 | function routesConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider, $locationProvider: angular.ILocationProvider) { |
| 7 | $locationProvider.html5Mode(false).hashPrefix(''); |
Matteo Scandolo | 9b46004 | 2017-04-14 16:24:45 -0700 | [diff] [blame] | 8 | $urlRouterProvider.otherwise('/loader'); |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 9 | |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 10 | // declare here static endpoints, |
| 11 | // core related endpoints are dynamically generated |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 12 | $stateProvider |
Matteo Scandolo | 9b46004 | 2017-04-14 16:24:45 -0700 | [diff] [blame] | 13 | .state('loader', { |
| 14 | url: '/loader', |
| 15 | component: 'xosLoader', |
| 16 | data: { |
| 17 | specialClass: 'blank' |
| 18 | } |
| 19 | }) |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 20 | .state('xos', { |
| 21 | abstract: true, |
| 22 | url: '/', |
| 23 | component: 'xos' |
| 24 | }) |
| 25 | .state('xos.dashboard', { |
Matteo Scandolo | 9b46004 | 2017-04-14 16:24:45 -0700 | [diff] [blame] | 26 | url: 'dashboard', |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 27 | parent: 'xos', |
Matteo Scandolo | d62ea79 | 2016-12-22 14:02:28 -0800 | [diff] [blame] | 28 | template: '<xos-dashboard></xos-dashboard>' |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 29 | }) |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 30 | .state('xos.core', { |
| 31 | url: 'core', |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 32 | parent: 'xos', |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 33 | abstract: true, |
Matteo Scandolo | 1aee198 | 2017-02-17 08:33:23 -0800 | [diff] [blame] | 34 | template: '<div ui-view></div>' |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 35 | }); |
| 36 | } |