import { ModuleWithProviders } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { HomeComponent } from './home/home.component' ; import { SlimComponent } from './slim/slim.component' ; import { DndComponent } from './dnd/dnd.component' ; import { ToastComponent } from './toast/toast.component' ; const appRoutes = [ { path : '' , component : HomeComponent } , { path : 'toasty' , component : ToastComponent } , { path : 'dnd' , component : DndComponent } , { path : 'slim' , component : SlimComponent } ] ; export const routing = RouterModule . forRoot ( appRoutes ) ;