import { NgModule, enableProdMode } from '@angular/core'; enableProdMode(); import { RouterModule } from '@angular/router'; import { UniversalModule } from 'angular2-universal'; import { AppComponent } from './app.component' import { NotFoundComponent } from './common/notFound/notFound.component'; import { SignupModule } from './signup/signup.module'; @NgModule({ bootstrap: [ AppComponent ], declarations: [ AppComponent, NotFoundComponent ], imports: [ UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too. RouterModule.forRoot([ { path: '404', component: NotFoundComponent}, { path: '**', redirectTo: '404' } ]), SignupModule ] }) export class AppModule { }