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(''); |
| 8 | $urlRouterProvider.otherwise('/'); |
| 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 |
| 13 | .state('xos', { |
| 14 | abstract: true, |
| 15 | url: '/', |
| 16 | component: 'xos' |
| 17 | }) |
| 18 | .state('xos.dashboard', { |
| 19 | url: '', |
| 20 | parent: 'xos', |
Matteo Scandolo | d62ea79 | 2016-12-22 14:02:28 -0800 | [diff] [blame] | 21 | template: '<xos-dashboard></xos-dashboard>' |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 22 | }) |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 23 | .state('xos.core', { |
| 24 | url: 'core', |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 25 | parent: 'xos', |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 26 | abstract: true, |
Matteo Scandolo | 1aee198 | 2017-02-17 08:33:23 -0800 | [diff] [blame] | 27 | template: '<div ui-view></div>' |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 28 | }); |
| 29 | } |