import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { BlogComponent } from './blog.component' ; const routes = [ { path : ':slug' , component : BlogComponent , } , ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] , } ) export class BlogRoutingModule { }