Skip to content

Commit

Permalink
chore(demo): add provideClientHydration
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Dec 17, 2024
1 parent a16071a commit 0a49eae
Show file tree
Hide file tree
Showing 7 changed files with 1,854 additions and 1,981 deletions.
3,817 changes: 1,836 additions & 1,981 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions projects/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@types/express": "5.0.0",
"date-fns": "4.1.0",
"express": "4.21.2",
"node-loader": "2.1.0",
"rxjs": "7.8.1",
"terser-webpack-plugin": "5.3.11"
}
Expand Down
2 changes: 2 additions & 0 deletions projects/demo/src/modules/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {HttpClient, provideHttpClient} from '@angular/common/http';
import type {ApplicationConfig} from '@angular/core';
import {inject, PLATFORM_ID, provideZoneChangeDetection} from '@angular/core';
import {toSignal} from '@angular/core/rxjs-interop';
import {provideClientHydration} from '@angular/platform-browser';
import {provideAnimations} from '@angular/platform-browser/animations';
import type {UrlTree} from '@angular/router';
import {provideRouter, withInMemoryScrolling} from '@angular/router';
Expand Down Expand Up @@ -55,6 +56,7 @@ import {exampleContentProcessor} from './utils';

export const config: ApplicationConfig = {
providers: [
provideClientHydration(),
provideAnimations(),
provideRouter(
ROUTES,
Expand Down
7 changes: 7 additions & 0 deletions projects/demo/src/modules/components/input-slider/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
</a>
</p>

<!-- drop ngSkipHydration after upgrade angular -->
<tui-doc-example
id="base"
heading="Basic"
ngSkipHydration
[component]="1 | tuiComponent"
[content]="1 | tuiExample: 'html,ts'"
[description]="stepQuantumDescription"
Expand All @@ -38,6 +40,7 @@
<tui-doc-example
id="slider-segments"
heading="With slider segments + ticks labels"
ngSkipHydration
[component]="2 | tuiComponent"
[content]="2 | tuiExample"
>
Expand All @@ -51,6 +54,7 @@
<tui-doc-example
id="key-steps"
heading="KeySteps"
ngSkipHydration
[component]="3 | tuiComponent"
[content]="3 | tuiExample"
>
Expand All @@ -65,13 +69,15 @@
<tui-doc-example
id="right-label"
heading="With right label"
ngSkipHydration
[component]="4 | tuiComponent"
[content]="4 | tuiExample"
/>

<tui-doc-example
id="min-max-labels"
heading="With min and max labels"
ngSkipHydration
[component]="5 | tuiComponent"
[content]="5 | tuiExample"
[description]="valueContentDescription"
Expand All @@ -97,6 +103,7 @@
<tui-doc-demo [control]="control">
<ng-template>
<tui-input-slider
ngSkipHydration
[focusable]="focusable"
[formControl]="control"
[keySteps]="keySteps"
Expand Down
2 changes: 2 additions & 0 deletions projects/demo/src/modules/components/multi-select/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
is a textfield with a dropdown for choosing several items
</div>

<!-- drop ngSkipHydration after upgrade angular -->
<tui-doc-example
*ngFor="let example of examples; let index = index"
ngSkipHydration
[component]="index + 1 | tuiComponent"
[content]="index + 1 | tuiExample"
[heading]="example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<ng-template pageTab>
<p>A directive that adjusts font size for the text to fit in the container</p>

<!-- drop ngSkipHydration after upgrade angular -->
<tui-doc-example
*ngFor="let example of examples; let index = index"
ngSkipHydration
[component]="index + 1 | tuiComponent"
[content]="index + 1 | tuiExample: 'html,ts'"
[heading]="example"
Expand Down
4 changes: 4 additions & 0 deletions projects/demo/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export function makeWebpackConfig({server}: Options): WebpackConf {
module: {
...ngConfigs.module,
rules: [
{
test: /.node$/,
loader: 'node-loader',
},
{
include: globSync(
path.resolve(
Expand Down

0 comments on commit 0a49eae

Please sign in to comment.