import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpModule } from '@angular/http'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.cmp'; import { RouterModule } from "@angular/router"; import { routes } from "./routes"; import { ListComponent } from "./list/list.cmp"; import { ViewComponent } from "./view/view.cmp"; import { TaskService } from "./task.srv"; @NgModule({ imports: [ BrowserModule, HttpModule, FormsModule, RouterModule.forRoot(routes, { useHash: true }) ], declarations: [ AppComponent, ListComponent, ViewComponent ], providers: [ TaskService ], bootstrap: [ AppComponent ] }) export class AppModule { }