Skip to content

Commit

Permalink
chore(demo): documentation page Let has infinite SSR (#7187)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Apr 8, 2024
1 parent fc71d03 commit edd917f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions projects/demo/src/modules/directives/let/examples/1/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
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';
import {interval, startWith} from 'rxjs';
import {interval, NEVER, startWith} from 'rxjs';

@Component({
selector: 'tui-let-example-1',
Expand All @@ -10,5 +11,7 @@ import {interval, startWith} from 'rxjs';
changeDetection,
})
export class TuiLetExample1 {
protected timer$ = interval(1000).pipe(startWith(0));
protected timer$ = isPlatformBrowser(inject(PLATFORM_ID))
? interval(1000).pipe(startWith(0))
: NEVER;
}

0 comments on commit edd917f

Please sign in to comment.