51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
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 './SingleThread/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 './send-post/send-post.component';
|
|
import { PostComponent } from './SingleThread/post/post.component'
|
|
import { ThreadsComponent } from './BoardThreads/threads.component';
|
|
import { OPComponent } from './BoardThreads/op/op.component';
|
|
|
|
const appRoutes: Routes = [
|
|
{ path: '', component: HomeComponent },
|
|
{ path: 'threads', component: ThreadsComponent},
|
|
{ path: 'board', component: BoardsComponent },
|
|
{ path: 'about', component: AboutComponent },
|
|
{ path: '**', component: NotFoundComponent }
|
|
]
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent,
|
|
HomeComponent,
|
|
AboutComponent,
|
|
BoardsComponent,
|
|
NotFoundComponent,
|
|
PostComponent,
|
|
SendPostComponent,
|
|
ThreadsComponent,
|
|
OPComponent
|
|
],
|
|
imports: [
|
|
BrowserModule,
|
|
RouterModule.forRoot(appRoutes),
|
|
HttpClientModule,
|
|
FormsModule
|
|
],
|
|
providers: [
|
|
ApiChatService
|
|
],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule { }
|