Skip to content

Commit

Permalink
chore(demo): documentation page Carousel has infinite SSR (#7121)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Mar 28, 2024
1 parent 69bfaf8 commit fe4f483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<tui-carousel
[duration]="4000"
[duration]="duration"
[(index)]="index"
>
<ng-container *ngFor="let item of items">
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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 = [
Expand Down

0 comments on commit fe4f483

Please sign in to comment.