blob: 970bed5d9b8a64ad97678e4c72d6847fc91097de [file] [log] [blame]
Matteo Scandoloe19fa102017-03-09 15:38:59 -08001/// <reference path="../typings/index.d.ts" />
2import * as angular from 'angular';
3
4import 'angular-ui-router';
5import 'angular-resource';
6import 'angular-cookies';
Matteo Scandoloe19fa102017-03-09 15:38:59 -08007import {xosVtrDashboardComponent} from './app/components/vtr/vtr-dashboard';
8import {XosVtrTruckroll} from './app/services/truckroll.resource';
9
10angular.module('xos-vtr-gui-extension', [
11 'ui.router',
12 'app'
13 ])
Matteo Scandoloe19fa102017-03-09 15:38:59 -080014 .service('XosVtrTruckroll', XosVtrTruckroll)
15 .component('xosVtrDashboardComponent', xosVtrDashboardComponent)
Matteo Scandolo7d994a82017-03-20 16:10:12 -070016 .run(function($log: ng.ILogService, XosNavigationService: any, XosRuntimeStates: any) {
Matteo Scandoloe19fa102017-03-09 15:38:59 -080017 $log.info('[xos-vtr-gui-extension] App is running');
18
19 XosNavigationService.add({
Matteo Scandolo7d994a82017-03-20 16:10:12 -070020 label: 'Vtr',
Matteo Scandoloe19fa102017-03-09 15:38:59 -080021 state: 'xos.vtr',
22 });
23
24 XosNavigationService.add({
25 label: 'Dashboard',
26 state: 'xos.vtr.dashboard',
27 parent: 'xos.vtr'
28 });
Matteo Scandolo7d994a82017-03-20 16:10:12 -070029
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 Scandoloe19fa102017-03-09 15:38:59 -080040 });