blob: 5d4af2bd008178a29b916999e0c667bbc788c69b [file] [log] [blame]
Sean Condona00bf382018-06-23 07:54:01 +01001/*
Sean Condon28ecc5f2018-06-25 12:50:16 +01002 * Copyright 2018-present Open Networking Foundation
Sean Condona00bf382018-06-23 07:54:01 +01003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16import { NgModule } from '@angular/core';
17import { Routes, RouterModule } from '@angular/router';
18
Sean Condon28ecc5f2018-06-25 12:50:16 +010019/**
20 * The set of Routes in the application - can be chosen from nav menu or
21 * elsewhere like tabular icon for flows etc
22 */
Sean Condona00bf382018-06-23 07:54:01 +010023const onosRoutes: Routes = [
24 {
25 path: 'apps',
26 loadChildren: 'app/view/apps/apps.module#AppsModule'
27 },
28 {
29 path: 'devices',
30 loadChildren: 'app/view/device/device.module#DeviceModule'
31 },
32 {
33 path: '',
Sean Condon28ecc5f2018-06-25 12:50:16 +010034 redirectTo: 'devices', // Default to devices view - change to topo in future
Sean Condona00bf382018-06-23 07:54:01 +010035 pathMatch: 'full'
36 }
37];
38
39/**
40 * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded
41 *
42 * See https://angular.io/guide/lazy-loading-ngmodules
43 * for the theory of operation
44 */
45@NgModule({
46 imports: [
47 RouterModule.forRoot(onosRoutes)
48 ],
49 exports: [RouterModule],
50 providers: []
51})
52export class OnosRoutingModule { }