mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
89 lines
2.3 KiB
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Sebastian Stehle. All rights reserved
|
|
*/
|
|
|
|
import * as Ng2 from '@angular/core';
|
|
import * as Ng2Router from '@angular/router';
|
|
|
|
import {
|
|
AppsPageComponent,
|
|
AppAreaComponent,
|
|
ClientsPageComponent,
|
|
ContributorsPageComponent,
|
|
DashboardPageComponent,
|
|
InternalAreaComponent,
|
|
HomePageComponent,
|
|
LanguagesPageComponent,
|
|
LogoutPageComponent,
|
|
NotFoundPageComponent,
|
|
SchemasPageComponent
|
|
} from './components';
|
|
|
|
import {
|
|
AppMustExistGuard,
|
|
MustBeAuthenticatedGuard,
|
|
MustBeNotAuthenticatedGuard
|
|
} from './shared';
|
|
|
|
export const routes: Ng2Router.Routes = [
|
|
{
|
|
path: '',
|
|
component: HomePageComponent,
|
|
canActivate: [MustBeNotAuthenticatedGuard]
|
|
},
|
|
{
|
|
path: 'app',
|
|
component: InternalAreaComponent,
|
|
canActivate: [MustBeAuthenticatedGuard],
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: AppsPageComponent
|
|
},
|
|
{
|
|
path: ':appName',
|
|
component: AppAreaComponent,
|
|
canActivate: [AppMustExistGuard],
|
|
children: [
|
|
{
|
|
path: '',
|
|
redirectTo: 'dashboard'
|
|
},
|
|
{
|
|
path: 'dashboard',
|
|
component: DashboardPageComponent
|
|
},
|
|
{
|
|
path: 'schemas',
|
|
component: SchemasPageComponent
|
|
},
|
|
{
|
|
path: 'contributors',
|
|
component: ContributorsPageComponent
|
|
},
|
|
{
|
|
path: 'clients',
|
|
component: ClientsPageComponent
|
|
},
|
|
{
|
|
path: 'languages',
|
|
component: LanguagesPageComponent
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'logout',
|
|
component: LogoutPageComponent
|
|
},
|
|
{
|
|
path: '**',
|
|
component: NotFoundPageComponent
|
|
}
|
|
];
|
|
|
|
export const routing: Ng2.ModuleWithProviders = Ng2Router.RouterModule.forRoot(routes, { useHash: false, enableTracing: true });
|