From eae2c2bd1cf3bfcba321d70e5ac8000bb0afd3e2 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Thu, 28 Mar 2024 15:59:53 +0300 Subject: [PATCH] chore(demo): documentation page `Carousel` has infinite SSR --- .../src/modules/components/carousel/examples/1/index.html | 2 +- .../demo/src/modules/components/carousel/examples/1/index.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/demo/src/modules/components/carousel/examples/1/index.html b/projects/demo/src/modules/components/carousel/examples/1/index.html index 9afa6f61958f..dbf0aab4bf90 100644 --- a/projects/demo/src/modules/components/carousel/examples/1/index.html +++ b/projects/demo/src/modules/components/carousel/examples/1/index.html @@ -1,5 +1,5 @@ diff --git a/projects/demo/src/modules/components/carousel/examples/1/index.ts b/projects/demo/src/modules/components/carousel/examples/1/index.ts index 79be422a1305..6dd7340bf784 100644 --- a/projects/demo/src/modules/components/carousel/examples/1/index.ts +++ b/projects/demo/src/modules/components/carousel/examples/1/index.ts @@ -1,4 +1,5 @@ -import {Component} from '@angular/core'; +import {isPlatformBrowser} from '@angular/common'; +import {Component, inject, PLATFORM_ID} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; @@ -10,6 +11,7 @@ import {encapsulation} from '@demo/emulate/encapsulation'; changeDetection, }) export class TuiCarouselExample1 { + protected duration = isPlatformBrowser(inject(PLATFORM_ID)) ? 4_000 : 0; protected index = 2; protected readonly items = [