diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index ebb68a1574f4..f3151df8578c 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -1031,14 +1031,11 @@ export const ROUTES: Routes = [ title: 'Preview', }, }, - { + route({ path: 'navigation/app-bar', - loadChildren: async () => - (await import('../components/app-bar/app-bar.module')).ExampleTuiAppBarModule, - data: { - title: 'AppBar', - }, - }, + loadComponent: async () => import('../components/app-bar/app-bar.component'), + title: 'AppBar', + }), { path: 'navigation/tab-bar', loadChildren: async () => diff --git a/projects/demo/src/modules/components/app-bar/app-bar.component.ts b/projects/demo/src/modules/components/app-bar/app-bar.component.ts index 15be45825504..c765ee021a17 100644 --- a/projects/demo/src/modules/components/app-bar/app-bar.component.ts +++ b/projects/demo/src/modules/components/app-bar/app-bar.component.ts @@ -1,13 +1,17 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; -import type {TuiDocExample} from '@taiga-ui/addon-doc'; +import {TuiAddonDocModule, type TuiDocExample} from '@taiga-ui/addon-doc'; + +import {TuiAppBarExample1} from './examples/1'; @Component({ + standalone: true, selector: 'example-tui-app-bar', + imports: [TuiAddonDocModule, TuiAppBarExample1], templateUrl: './app-bar.template.html', changeDetection, }) -export class ExampleTuiAppBarComponent { +export default class ExampleTuiAppBarComponent { protected readonly exampleModule = import('./examples/import/import-module.md?raw'); protected readonly exampleHtml = import('./examples/import/insert-template.md?raw'); diff --git a/projects/demo/src/modules/components/app-bar/app-bar.module.ts b/projects/demo/src/modules/components/app-bar/app-bar.module.ts deleted file mode 100644 index f42efe272e92..000000000000 --- a/projects/demo/src/modules/components/app-bar/app-bar.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; -import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; -import {TuiAppBarModule} from '@taiga-ui/addon-mobile'; -import {TuiButtonModule, TuiLabelModule, TuiNotificationModule} from '@taiga-ui/core'; -import {TuiProgressModule} from '@taiga-ui/kit'; - -import {ExampleTuiAppBarComponent} from './app-bar.component'; -import {TuiAppBarExample1} from './examples/1'; - -@NgModule({ - imports: [ - CommonModule, - TuiButtonModule, - TuiProgressModule, - TuiLabelModule, - TuiNotificationModule, - TuiAppBarModule, - TuiAddonDocModule, - RouterModule.forChild(tuiGenerateRoutes(ExampleTuiAppBarComponent)), - ], - declarations: [ExampleTuiAppBarComponent, TuiAppBarExample1], - exports: [ExampleTuiAppBarComponent], -}) -export class ExampleTuiAppBarModule {} diff --git a/projects/demo/src/modules/components/app-bar/examples/1/index.ts b/projects/demo/src/modules/components/app-bar/examples/1/index.ts index 2213e0e75059..18910b80f515 100644 --- a/projects/demo/src/modules/components/app-bar/examples/1/index.ts +++ b/projects/demo/src/modules/components/app-bar/examples/1/index.ts @@ -1,9 +1,14 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiAppBarModule} from '@taiga-ui/addon-mobile'; +import {TuiButtonModule, TuiLabelModule} from '@taiga-ui/core'; +import {TuiProgressModule} from '@taiga-ui/kit'; @Component({ + standalone: true, selector: 'tui-app-bar-example-1', + imports: [TuiAppBarModule, TuiButtonModule, TuiProgressModule, TuiLabelModule], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation,