Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 1 | /// <reference path="../typings/index.d.ts" /> |
| 2 | import * as angular from 'angular'; |
| 3 | |
| 4 | import 'angular-ui-router'; |
| 5 | import 'angular-resource'; |
| 6 | import 'angular-cookies'; |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 7 | import {xosVtrDashboardComponent} from './app/components/vtr/vtr-dashboard'; |
| 8 | import {XosVtrTruckroll} from './app/services/truckroll.resource'; |
| 9 | |
| 10 | angular.module('xos-vtr-gui-extension', [ |
| 11 | 'ui.router', |
| 12 | 'app' |
| 13 | ]) |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 14 | .service('XosVtrTruckroll', XosVtrTruckroll) |
| 15 | .component('xosVtrDashboardComponent', xosVtrDashboardComponent) |
Matteo Scandolo | 7d994a8 | 2017-03-20 16:10:12 -0700 | [diff] [blame] | 16 | .run(function($log: ng.ILogService, XosNavigationService: any, XosRuntimeStates: any) { |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 17 | $log.info('[xos-vtr-gui-extension] App is running'); |
| 18 | |
| 19 | XosNavigationService.add({ |
Matteo Scandolo | 7d994a8 | 2017-03-20 16:10:12 -0700 | [diff] [blame] | 20 | label: 'Vtr', |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 21 | state: 'xos.vtr', |
| 22 | }); |
| 23 | |
| 24 | XosNavigationService.add({ |
| 25 | label: 'Dashboard', |
| 26 | state: 'xos.vtr.dashboard', |
| 27 | parent: 'xos.vtr' |
| 28 | }); |
Matteo Scandolo | 7d994a8 | 2017-03-20 16:10:12 -0700 | [diff] [blame] | 29 | |
| 30 | XosRuntimeStates.addState(`xos.vtr`, { |
| 31 | abstract: true, |
| 32 | template: '<div ui-view></div>' |
| 33 | }); |
| 34 | |
| 35 | XosRuntimeStates.addState(`xos.vtr.dashboard`, { |
| 36 | url: 'vtr/dashboard', |
| 37 | parent: 'xos.vtr', |
| 38 | component: 'xosVtrDashboardComponent' |
| 39 | }); |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 40 | }); |