Created
January 28, 2021 10:00
-
-
Save m-goos/793206c8b6a5ad612e3b5c78e2c287ac to your computer and use it in GitHub Desktop.
The module for an Angular blog based on MarkDown files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { RouterModule } from '@angular/router'; | |
import { MarkdownModule } from 'ngx-markdown'; | |
import { HttpClient, HttpClientModule } from '@angular/common/http'; | |
import { EntryListComponent } from './entry-list/entry-list.component'; | |
import { PostComponent } from './post/post.component'; | |
@NgModule({ | |
declarations: [EntryListComponent, PostComponent], | |
imports: [ | |
CommonModule, | |
RouterModule.forChild([ | |
{ | |
path: '', | |
component: EntryListComponent, | |
}, | |
{ path: ':id', component: PostComponent, pathMatch: 'full'} | |
]), | |
HttpClientModule, | |
MarkdownModule.forRoot({ loader: HttpClient }), | |
], | |
}) | |
export class BlogModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment