Headless CMS and Content Managment Hub
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.
 
 
 
 
 

96 lines
2.6 KiB

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DndModule } from 'ng2-dnd';
import {
CanDeactivateGuard,
ResolveAppLanguagesGuard,
ResolveContentGuard,
ResolvePublishedSchemaGuard,
SqxFrameworkModule,
SqxSharedModule
} from '@app/shared';
import {
AssetsEditorComponent,
ContentFieldComponent,
ContentHistoryComponent,
ContentPageComponent,
ContentItemComponent,
ContentsPageComponent,
ContentsSelectorComponent,
ReferencesEditorComponent,
SchemasPageComponent,
SearchFormComponent
} 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]
},
{
path: ':contentId',
component: ContentPageComponent,
canDeactivate: [CanDeactivateGuard],
resolve: {
content: ResolveContentGuard
},
children: [
{
path: 'history',
component: ContentHistoryComponent,
data: {
channel: 'contents.{contentId}'
}
}
]
}
]
}]
}
];
@NgModule({
imports: [
SqxFrameworkModule,
SqxSharedModule,
DndModule,
RouterModule.forChild(routes)
],
declarations: [
AssetsEditorComponent,
ContentFieldComponent,
ContentHistoryComponent,
ContentItemComponent,
ContentPageComponent,
ContentsPageComponent,
ContentsSelectorComponent,
ReferencesEditorComponent,
SchemasPageComponent,
SearchFormComponent
]
})
export class SqxFeatureContentModule { }