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.
93 lines
2.6 KiB
93 lines
2.6 KiB
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Sebastian Stehle. All rights reserved
|
|
*/
|
|
|
|
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
import {
|
|
CanDeactivateGuard,
|
|
HistoryComponent,
|
|
ResolveAppLanguagesGuard,
|
|
ResolveContentGuard,
|
|
ResolvePublishedSchemaGuard,
|
|
SqxFrameworkModule,
|
|
SqxSharedModule
|
|
} from 'shared';
|
|
|
|
import {
|
|
ContentFieldComponent,
|
|
ContentPageComponent,
|
|
ContentItemComponent,
|
|
ContentsPageComponent,
|
|
SchemasPageComponent
|
|
} from './declarations';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: '',
|
|
component: SchemasPageComponent,
|
|
children: [
|
|
{
|
|
path: ''
|
|
},
|
|
{
|
|
path: ':schemaName',
|
|
component: ContentsPageComponent,
|
|
resolve: {
|
|
schema: ResolvePublishedSchemaGuard, appLanguages: ResolveAppLanguagesGuard
|
|
},
|
|
children: [
|
|
{
|
|
path: 'new',
|
|
component: ContentPageComponent,
|
|
canDeactivate: [CanDeactivateGuard],
|
|
children: [
|
|
{
|
|
path: 'assets',
|
|
loadChildren: './../assets/module#SqxFeatureAssetsModule'
|
|
}
|
|
]
|
|
}, {
|
|
path: ':contentId',
|
|
component: ContentPageComponent,
|
|
canDeactivate: [CanDeactivateGuard],
|
|
resolve: {
|
|
content: ResolveContentGuard
|
|
},
|
|
children: [
|
|
{
|
|
path: 'history',
|
|
component: HistoryComponent,
|
|
data: {
|
|
channel: 'contents.{contentId}'
|
|
}
|
|
}, {
|
|
path: 'assets',
|
|
loadChildren: './../assets/module#SqxFeatureAssetsModule'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}]
|
|
}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
SqxFrameworkModule,
|
|
SqxSharedModule,
|
|
RouterModule.forChild(routes)
|
|
],
|
|
declarations: [
|
|
ContentFieldComponent,
|
|
ContentItemComponent,
|
|
ContentPageComponent,
|
|
ContentsPageComponent,
|
|
SchemasPageComponent
|
|
]
|
|
})
|
|
export class SqxFeatureContentModule { }
|