Enabled --prod mode for GUI2 - refactored modules
Change-Id: I224fe9564cb225b9ebaed0a43281de54ec6eb274
diff --git a/web/gui2/src/main/webapp/app/onos.module.ts b/web/gui2/src/main/webapp/app/onos.module.ts
index 8e4af34..78cf112 100644
--- a/web/gui2/src/main/webapp/app/onos.module.ts
+++ b/web/gui2/src/main/webapp/app/onos.module.ts
@@ -16,7 +16,6 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
import { AppsModule } from './view/apps/apps.module';
import { DeviceModule } from './view/device/device.module';
@@ -25,12 +24,9 @@
import { MastModule } from './fw/mast/mast.module';
import { NavModule } from './fw/nav/nav.module';
import { SvgModule } from './fw/svg/svg.module';
-import { RemoteModule } from './fw/remote/remote.module';
-import { UtilModule } from './fw/util/util.module';
import { WidgetModule } from './fw/widget/widget.module';
+import { OnosRoutingModule } from './onos-routing.module';
-import { AppsComponent } from './view/apps/apps.component';
-import { DeviceComponent } from './view/device/device.component';
import { OnosComponent } from './onos.component';
import { DetectBrowserDirective } from './detectbrowser.directive';
@@ -38,12 +34,6 @@
import { LogService } from './log.service';
import { OnosService } from './onos.service';
-const onosRoutes: Routes = [
- { path: 'apps', component: AppsComponent }, // All except default should be driven by
- { path: 'device', component: DeviceComponent }, // servlet like {INJECTED-VIEW-DATA-START}
- { path: '**', component: DeviceComponent } // Change to Topo(2) when it's ready for normal behaviour
-];
-
/**
* ONOS GUI -- Main Application Module
*/
@@ -53,23 +43,19 @@
DetectBrowserDirective
],
imports: [
- AppsModule,
- DeviceModule,
BrowserModule,
BrowserAnimationsModule,
LayerModule,
MastModule,
NavModule,
- RouterModule.forRoot(onosRoutes, { enableTracing: false }),
SvgModule,
- RemoteModule,
- UtilModule, // For OnosComponent
- WidgetModule
+ WidgetModule,
+ OnosRoutingModule
],
providers: [
OnosService,
{ provide: LogService, useClass: ConsoleLoggerService },
- { provide: Window, useValue: window }
+ { provide: 'Window', useValue: window }
],
bootstrap: [
OnosComponent,