import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { Routes, RouterModule } from '@angular/router'; import { HttpClientModule } from '@angular/common/http'; import { AppComponent } from './app.component'; import { HomeComponent } from './home/home.component'; import { AboutComponent } from './about/about.component'; import { BoardsComponent } from './boards/boards.component'; import { NotFoundComponent } from './not-found/not-found.component'; import { ApiChatService } from './services/api-chat.service'; import { FormsModule } from '@angular/forms'; import { SendPostComponent } from './boards/send-post/send-post.component'; import { PostComponent } from './boards/post/post.component' const appRoutes: Routes = [ { path: '', component: HomeComponent }, { path: 'boards', component: BoardsComponent }, { path: 'about', component: AboutComponent }, { path: '**', component: NotFoundComponent }, ] @NgModule({ declarations: [ AppComponent, HomeComponent, AboutComponent, BoardsComponent, NotFoundComponent, PostComponent, SendPostComponent ], imports: [ BrowserModule, RouterModule.forRoot(appRoutes), HttpClientModule, FormsModule ], providers: [ApiChatService], bootstrap: [AppComponent] }) export class AppModule { }