From b9708a7c3cfaf5767992a2b15180e7b85c459242 Mon Sep 17 00:00:00 2001 From: "Eran (ev672n), Vosk" Date: Tue, 7 Aug 2018 14:15:05 +0300 Subject: adding the dcae dt code Adding DCAE-dt code Change-Id: Id6b779db9d24e10825fb97ad5fd46f41e65e6738 Issue-ID: SDC-1614 Signed-off-by: Eran (ev672n), Vosk --- app/app.route.js | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 app/app.route.js (limited to 'app/app.route.js') diff --git a/app/app.route.js b/app/app.route.js new file mode 100644 index 0000000..ee2a161 --- /dev/null +++ b/app/app.route.js @@ -0,0 +1,72 @@ +(function () { + + 'use strict'; + + angular + .module('dcaeApp') + .config(routeConfig); + + function routeConfig($stateProvider, $urlRouterProvider, dcaeConstants) { + + //$urlRouterProvider.otherwise('/dcae/home'); + + var layoutStyle = 'contentOnly'; + + var layouts = { + contentWithHeaderAndNavigation: { + main: 'core/layouts/header-navigation-content/header-navigation-content.html', + header: 'core/header/layouts/horizontal-navigation/header.html', + navigation: 'core/navigation/layouts/horizontal-navigation/navigation.html' + }, + contentOnly: { + main: 'core/layouts/content-only/content-only.html', + header: '', + navigation: '' + }, + contentWithHeader: { + main: 'core/layouts/content-with-header/content-with-header.html', + header: 'header/layouts/content-with-header/header.html', + navigation: '' + } + }; + + // @if DEBUG + // Note: this section is removed when running grunt. + // If you want to run the application as standalone from the dist folder you need to remove: if DEBUG and endif and build the grunt again. + $stateProvider.state('dcae', { + url: '/dcae', + views: { + 'dcae@': { + template: '
' + } + } + }); + // @endif + + // State definitions + $stateProvider + .state('dcae.app', { + parent: 'dcae', + abstract: true, + views: { + // This is the main view (defined in the hosting application) + 'main@dcae': { + templateUrl: layouts[layoutStyle].main, + controller: 'MainController as vm' + }/*, + + // According to the view used in "main@" we have another 3 views in main: 'header@app', 'navigation@app' and 'content@app' (defined in each page module) + 'header@dcae.app': { // View inside the main + templateUrl: layouts[layoutStyle].header, + controller: 'HeaderController as vm' + }, + 'navigation@dcae.app': { // View inside the main + templateUrl: layouts[layoutStyle].navigation, + controller: 'NavigationController as vm' + }*/ + } + }); + + } + +})(); -- cgit 1.2.3-korg