Skip to content

Instantly share code, notes, and snippets.

@SergioLarios
Created August 23, 2017 14:39
Show Gist options
  • Save SergioLarios/f645bcc343d34018dd449fa90b71159e to your computer and use it in GitHub Desktop.
Save SergioLarios/f645bcc343d34018dd449fa90b71159e to your computer and use it in GitHub Desktop.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ControlPanelComponent } from './routes/control-panel/control-panel.component';
import { InstancesComponent } from './routes/instances/instances.component';
import { ServerLogsComponent } from './routes/server-logs/server-logs.component';
import { ApiManagerComponent } from './routes/api-manager/api-manager.component';
import { PluginsComponent } from './routes/plugins/plugins.component';
import { EditInstanceComponent } from './routes/instances/edit-instance/edit-instance.component';
import { ServerConfigurationComponent } from './routes/server-configuration/server-configuration.component';
const routes: Routes = [
{
path: '',
redirectTo: 'control-panel',
pathMatch: 'full'
},
{
path: 'control-panel',
component: ControlPanelComponent
},
{
path: 'instances',
children: [
{
path: '',
component: InstancesComponent
},
{
path: 'create',
component: EditInstanceComponent
},
{
path: 'edit/{customId}',
component: EditInstanceComponent
}
]
},
{
path: 'server-logs',
component: ServerLogsComponent
},
{
path: 'api-manager',
component: ApiManagerComponent
},
{
path: 'plugins',
component: PluginsComponent
},
{
path: 'server-configuration',
component: ServerConfigurationComponent
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment