diff --git a/package.json b/package.json index e473358..f6abe21 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "ng": "ng", "reset": "ng init --routing --style=scss", - "start": "ng serve", + "start": "ng serve -open --proxy=proxy.conf.json", + "build": "ng build -bh \"/monitoring/ui/\"", "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check", "test": "ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", diff --git a/proxy.conf.json b/proxy.conf.json new file mode 100644 index 0000000..9818066 --- /dev/null +++ b/proxy.conf.json @@ -0,0 +1,8 @@ +{ + "/monitoring/ui/**": { + "target": "http://localhost:4200/", + "pathRewrite": { + "^/monitoring/ui": "" + } + } +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 99d24e7..377de21 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -14,10 +14,10 @@ export const routes: Routes = [ }, { path: 'bundled', - loadChildren: loadBundledModule + // loadChildren: loadBundledModule // Comment loadChildren above and uncomment the line below to get non lazy loading working with AoT // Do not delete / comment the `loadBundledModule` declaration or the module will be lazy loaded - // loadChildren: './bundled/bundled.module#BundledModule' + loadChildren: './bundled/bundled.module#BundledModule' }, { path: 'lazy', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ec12f16..79fc803 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,6 +1,6 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; +import { ReactiveFormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { AppRoutingModule } from './app-routing.module'; @@ -15,7 +15,7 @@ import { SimpleRouteComponent } from './simple-route/simple-route.component'; ], imports: [ BrowserModule, - FormsModule, + ReactiveFormsModule, HttpModule, AppRoutingModule ], diff --git a/src/app/simple-route/simple-route.component.html b/src/app/simple-route/simple-route.component.html index 667324c..63d4445 100644 --- a/src/app/simple-route/simple-route.component.html +++ b/src/app/simple-route/simple-route.component.html @@ -1,3 +1,24 @@
simple-route works!
+ + +