import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { DashboardComponent } from './dashboard/dashboard.component'; import { WebideComponent } from './webide/webide.component'; import { TerminalComponent } from './terminal/terminal.component'; import { MessagesComponent } from './messages/messages.component'; import { TestmessengerComponent } from './testmessenger/testmessenger.component'; import { config } from './config'; const routes: Routes = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full'}, { path: config.dashboard.route, component: DashboardComponent}, { path: config.webide.route, component: WebideComponent }, { path: config.terminal.route, component: TerminalComponent }, { path: config.messages.route, component: MessagesComponent }, { path: config.testmessenger.route, component: TestmessengerComponent } ]; @NgModule({ imports: [ RouterModule.forRoot(routes) ], exports: [ RouterModule ], }) export class AppRoutingModule {}