import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule, Routes } from '@angular/router'; import {HttpModule} from '@angular/http'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; import {SiteMenuComponent} from './shared/site-menu.component'; import {SiteFooterComponent} from './shared/site-footer.component'; import {LoginComponent} from './pages/login.component'; import {UpdatePasswordComponent} from './pages/update-password.component'; import {DashboardComponent} from './pages/dashboard.component'; const appRoutes: Routes = [ { path: '', component: DashboardComponent }, { path: 'dashboard', redirectTo: '', pathMatch: 'full' }, { path: 'login', component: LoginComponent }, { path: 'login/:slug', component: LoginComponent } ]; @NgModule({ imports: [ BrowserModule, HttpModule, RouterModule.forRoot(appRoutes), FormsModule ], declarations: [ AppComponent, SiteMenuComponent, SiteFooterComponent, DashboardComponent, LoginComponent, UpdatePasswordComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }