import { NgModule } from '@angular/core' ; import { RouterModule , Routes } from '@angular/router' ; import { HomeComponent } from './home/home.component' ; import { GettingStartedComponent } from './getting-started/getting-started.component' ; import { DOCS_ROUTES } from './demo-docs.routes' ; const routes = [ { path : '' , pathMatch : 'full' , component : HomeComponent , } , { path : 'getting-started' , component : GettingStartedComponent , } , { path : 'docs' , children : DOCS_ROUTES , } , { path : '**' , redirectTo : '/' , } , ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes , { useHash : true , scrollPositionRestoration : 'disabled' , anchorScrolling : 'disabled' , } ) , ] , exports : [ RouterModule ] , } ) export class DemoRoutingModule { }