import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { Routes , RouterModule } from '@angular/router' ; import { HomeComponent } from './home.component' ; const routes = [ { path : 'home' , component : HomeComponent } ] ; @ NgModule ( { declarations : [ ] , imports : [ CommonModule , RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class HomeRoutingModule { }