In AngularSpa template, redefine app.module.shared as a real NgModule. Fixes #986.

This commit is contained in:
Steve Sanderson
2017-06-08 11:08:36 +01:00
parent 0dd24068ca
commit f3b7103c83
5 changed files with 33 additions and 30 deletions

View File

@@ -1,14 +1,16 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './components/app/app.component'
import { AppComponent } from './components/app/app.component';
import { NavMenuComponent } from './components/navmenu/navmenu.component';
import { HomeComponent } from './components/home/home.component';
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
import { CounterComponent } from './components/counter/counter.component';
export const sharedConfig: NgModule = {
bootstrap: [ AppComponent ],
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
@@ -17,6 +19,9 @@ export const sharedConfig: NgModule = {
HomeComponent
],
imports: [
CommonModule,
HttpModule,
FormsModule,
RouterModule.forRoot([
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
@@ -25,4 +30,6 @@ export const sharedConfig: NgModule = {
{ path: '**', redirectTo: 'home' }
])
]
};
})
export class AppModuleShared {
}