Skip to content

Commit

Permalink
chore(demo): migrate documentation page AppBar to standalone compon…
Browse files Browse the repository at this point in the history
…ents (#6968)
  • Loading branch information
KrollikRoddzer authored Mar 11, 2024
1 parent 63ed8a3 commit c2d591b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 35 deletions.
11 changes: 4 additions & 7 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
26 changes: 0 additions & 26 deletions projects/demo/src/modules/components/app-bar/app-bar.module.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit c2d591b

Please sign in to comment.