54 lines
1.7 KiB
TypeScript
54 lines
1.7 KiB
TypeScript
import { BrowserModule } from '@angular/platform-browser';
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { AppComponent } from './app.component';
|
|
import { MainPageComponent } from './main-page/main-page.component';
|
|
import { MainPagePostComponent } from './main-page-post/main-page-post.component';
|
|
import { SinglePostComponent } from './single-post/single-post.component';
|
|
import { CommentComponent } from './comment/comment.component';
|
|
import { MenuComponent } from './menu/menu.component';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
import {RouterModule, Routes} from '@angular/router';
|
|
import {MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, MatRippleModule} from '@angular/material';
|
|
import { RightPanelComponent } from './right-panel/right-panel.component';
|
|
import {FormsModule} from '@angular/forms';
|
|
import {HttpClientModule} from '@angular/common/http';
|
|
|
|
const appRoutes: Routes = [
|
|
{ path: '', component: MainPageComponent },
|
|
{path: 'post/:id', component: SinglePostComponent},
|
|
// { path: 'hero/:id', component: HeroDetailComponent },
|
|
|
|
// { path: '**', component: PageNotFoundComponent }
|
|
];
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent,
|
|
MainPageComponent,
|
|
MainPagePostComponent,
|
|
SinglePostComponent,
|
|
CommentComponent,
|
|
MenuComponent,
|
|
RightPanelComponent
|
|
],
|
|
imports: [
|
|
RouterModule.forRoot(
|
|
appRoutes,
|
|
{enableTracing: true} // <-- debugging purposes only
|
|
),
|
|
BrowserModule,
|
|
BrowserAnimationsModule,
|
|
MatCardModule,
|
|
MatButtonModule,
|
|
MatRippleModule,
|
|
MatInputModule,
|
|
MatFormFieldModule,
|
|
FormsModule,
|
|
HttpClientModule,
|
|
],
|
|
providers: [],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule { }
|