From 7462b25d904c911fbcec51827cafd83901f14e1b Mon Sep 17 00:00:00 2001 From: splincode Date: Fri, 26 Jan 2024 14:23:54 +0300 Subject: [PATCH] chore(demo): set doc page as standalone --- projects/demo/src/modules/app/app.routes.ts | 2 +- .../demo/src/modules/info/doc/doc.component.ts | 6 +++++- .../demo/src/modules/info/doc/doc.module.ts | 17 ----------------- 3 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 projects/demo/src/modules/info/doc/doc.module.ts diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index 3bcca115936d..e363da9e3f63 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -43,7 +43,7 @@ export const ROUTES: Routes = [ }, { path: 'tui-doc', - loadChildren: async () => (await import('../info/doc/doc.module')).DocModule, + loadComponent: async () => import('../info/doc/doc.component'), data: { title: 'Documentation engine', }, diff --git a/projects/demo/src/modules/info/doc/doc.component.ts b/projects/demo/src/modules/info/doc/doc.component.ts index 05e2d0e95884..be869cd6a4c7 100644 --- a/projects/demo/src/modules/info/doc/doc.component.ts +++ b/projects/demo/src/modules/info/doc/doc.component.ts @@ -1,9 +1,13 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; +import {TuiDocPageModule} from '@taiga-ui/addon-doc'; +import {TuiLinkModule} from '@taiga-ui/core'; @Component({ + standalone: true, selector: 'doc', + imports: [TuiDocPageModule, TuiLinkModule], templateUrl: './doc.template.html', changeDetection, }) -export class DocComponent {} +export default class DocComponent {} diff --git a/projects/demo/src/modules/info/doc/doc.module.ts b/projects/demo/src/modules/info/doc/doc.module.ts deleted file mode 100644 index db40baa2f0aa..000000000000 --- a/projects/demo/src/modules/info/doc/doc.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; -import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; -import {TuiLinkModule} from '@taiga-ui/core'; - -import {DocComponent} from './doc.component'; - -@NgModule({ - imports: [ - TuiLinkModule, - TuiAddonDocModule, - RouterModule.forChild(tuiGenerateRoutes(DocComponent)), - ], - declarations: [DocComponent], - exports: [DocComponent], -}) -export class DocModule {}