diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index 3bf5b59a9883..92339e35b7ee 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -270,15 +270,11 @@ export const ROUTES: Routes = [ title: 'Navigation', }, }, - { + route({ path: DemoRoute.Breadcrumbs, - loadChildren: async () => - (await import('../components/breadcrumbs/breadcrumbs.module')) - .ExampleTuiBreadcrumbsModule, - data: { - title: 'Breadcrumbs', - }, - }, + title: 'Breadcrumbs', + loadComponent: async () => import('../components/breadcrumbs'), + }), route({ path: DemoRoute.Button, title: 'Button', diff --git a/projects/demo/src/modules/components/breadcrumbs/breadcrumbs.module.ts b/projects/demo/src/modules/components/breadcrumbs/breadcrumbs.module.ts deleted file mode 100644 index 45e61337fca8..000000000000 --- a/projects/demo/src/modules/components/breadcrumbs/breadcrumbs.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {FormsModule} from '@angular/forms'; -import {RouterModule} from '@angular/router'; -import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; -import {TuiRepeatTimesModule} from '@taiga-ui/cdk'; -import { - TuiButtonDirective, - TuiDataListModule, - TuiDropdownModule, - TuiLinkDirective, -} from '@taiga-ui/core'; -import {TuiBreadcrumbsModule, TuiInputNumberModule} from '@taiga-ui/kit'; - -import {ExampleTuiBreadcrumbsComponent} from './breadcrumbs.component'; -import {TuiBreadcrumbsExample1} from './examples/1'; -import {TuiBreadcrumbsExample2} from './examples/2'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - TuiBreadcrumbsModule, - TuiLinkDirective, - TuiAddonDocModule, - TuiDropdownModule, - TuiButtonDirective, - TuiDataListModule, - TuiInputNumberModule, - TuiRepeatTimesModule, - RouterModule.forChild(tuiGenerateRoutes(ExampleTuiBreadcrumbsComponent)), - ], - declarations: [ - ExampleTuiBreadcrumbsComponent, - TuiBreadcrumbsExample1, - TuiBreadcrumbsExample2, - ], - exports: [ExampleTuiBreadcrumbsComponent], -}) -export class ExampleTuiBreadcrumbsModule {} diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/1/index.less b/projects/demo/src/modules/components/breadcrumbs/examples/1/index.less new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/1/index.ts b/projects/demo/src/modules/components/breadcrumbs/examples/1/index.ts index 0902b579b46a..4c9a2ad8620f 100644 --- a/projects/demo/src/modules/components/breadcrumbs/examples/1/index.ts +++ b/projects/demo/src/modules/components/breadcrumbs/examples/1/index.ts @@ -1,14 +1,19 @@ +import {NgFor} from '@angular/common'; import {Component} from '@angular/core'; +import {RouterLink} from '@angular/router'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiLinkDirective} from '@taiga-ui/core'; +import {TuiBreadcrumbsModule} from '@taiga-ui/kit'; @Component({ - selector: 'tui-breadcrumbs-example-1', + standalone: true, + imports: [NgFor, RouterLink, TuiBreadcrumbsModule, TuiLinkDirective], templateUrl: './index.html', encapsulation, changeDetection, }) -export class TuiBreadcrumbsExample1 { +export default class ExampleComponent { protected items = [ { caption: 'Selects', diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/2/index.less b/projects/demo/src/modules/components/breadcrumbs/examples/2/index.less new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/2/index.ts b/projects/demo/src/modules/components/breadcrumbs/examples/2/index.ts index 62b6ae9f7a7b..cf780286252c 100644 --- a/projects/demo/src/modules/components/breadcrumbs/examples/2/index.ts +++ b/projects/demo/src/modules/components/breadcrumbs/examples/2/index.ts @@ -1,10 +1,32 @@ import {Component} from '@angular/core'; +import {FormsModule} from '@angular/forms'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {tuiBreadcrumbsOptionsProvider} from '@taiga-ui/kit'; +import {TuiRepeatTimesModule} from '@taiga-ui/cdk'; +import { + TuiButtonDirective, + TuiDataListModule, + TuiDropdownModule, + TuiLinkDirective, +} from '@taiga-ui/core'; +import { + TuiBreadcrumbsModule, + tuiBreadcrumbsOptionsProvider, + TuiInputNumberModule, +} from '@taiga-ui/kit'; @Component({ - selector: 'tui-breadcrumbs-example-2', + standalone: true, + imports: [ + FormsModule, + TuiBreadcrumbsModule, + TuiDropdownModule, + TuiDataListModule, + TuiInputNumberModule, + TuiRepeatTimesModule, + TuiLinkDirective, + TuiButtonDirective, + ], templateUrl: './index.html', encapsulation, changeDetection, @@ -15,7 +37,7 @@ import {tuiBreadcrumbsOptionsProvider} from '@taiga-ui/kit'; }), ], }) -export class TuiBreadcrumbsExample2 { +export default class ExampleComponent { protected readonly items = [ { caption: 'Open Source', diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/import/import-module.md b/projects/demo/src/modules/components/breadcrumbs/examples/import/import.md similarity index 100% rename from projects/demo/src/modules/components/breadcrumbs/examples/import/import-module.md rename to projects/demo/src/modules/components/breadcrumbs/examples/import/import.md diff --git a/projects/demo/src/modules/components/breadcrumbs/examples/import/insert-template.md b/projects/demo/src/modules/components/breadcrumbs/examples/import/template.md similarity index 100% rename from projects/demo/src/modules/components/breadcrumbs/examples/import/insert-template.md rename to projects/demo/src/modules/components/breadcrumbs/examples/import/template.md diff --git a/projects/demo/src/modules/components/breadcrumbs/breadcrumbs.template.html b/projects/demo/src/modules/components/breadcrumbs/index.html similarity index 51% rename from projects/demo/src/modules/components/breadcrumbs/breadcrumbs.template.html rename to projects/demo/src/modules/components/breadcrumbs/index.html index 1803bbbe4f17..46327be35030 100644 --- a/projects/demo/src/modules/components/breadcrumbs/breadcrumbs.template.html +++ b/projects/demo/src/modules/components/breadcrumbs/index.html @@ -7,21 +7,13 @@
Navigation element that shows a path from root page to the current
- Import
- TuiBreadcrumbsModule
- into a module where you want to use our component
-
Add to the template:
- -