Hardcode routes to router module to eliminate weird dependency

This commit is contained in:
Kristóf Tóth 2019-08-16 11:26:40 +02:00
parent 448a2bc862
commit 208edd9533

View File

@ -7,16 +7,15 @@ import { TerminalComponent } from './terminal/terminal.component';
import { MessagesComponent } from './messages/messages.component'; import { MessagesComponent } from './messages/messages.component';
import { ConsoleComponent } from './console/console.component'; import { ConsoleComponent } from './console/console.component';
import { TestmessengerComponent } from './testmessenger/testmessenger.component'; import { TestmessengerComponent } from './testmessenger/testmessenger.component';
import { config } from './config';
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full'}, { path: '', redirectTo: '/dashboard', pathMatch: 'full'},
{ path: config.dashboard.route, component: DashboardComponent}, { path: 'dashboard', component: DashboardComponent},
{ path: config.ide.route, component: IdeComponent }, { path: 'ide', component: IdeComponent },
{ path: config.terminal.route, component: TerminalComponent }, { path: 'terminal', component: TerminalComponent },
{ path: config.messages.route, component: MessagesComponent }, { path: 'messages', component: MessagesComponent },
{ path: config.console.route, component: ConsoleComponent }, { path: 'console', component: ConsoleComponent },
{ path: config.testmessenger.route, component: TestmessengerComponent } { path: 'testmessenger', component: TestmessengerComponent }
]; ];
@NgModule({ @NgModule({