Skip to content

Instantly share code, notes, and snippets.

@m-goos
Created January 28, 2021 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-goos/793206c8b6a5ad612e3b5c78e2c287ac to your computer and use it in GitHub Desktop.
Save m-goos/793206c8b6a5ad612e3b5c78e2c287ac to your computer and use it in GitHub Desktop.
The module for an Angular blog based on MarkDown files
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