diff --git a/projects/demo/src/modules/app/app.component.ts b/projects/demo/src/modules/app/app.component.ts index 9aee7a5297c3..744f973f31f0 100644 --- a/projects/demo/src/modules/app/app.component.ts +++ b/projects/demo/src/modules/app/app.component.ts @@ -1,6 +1,6 @@ import type {OnInit} from '@angular/core'; import {Component, DestroyRef, inject, ViewEncapsulation} from '@angular/core'; -import {takeUntilDestroyed} from '@angular/core/rxjs-interop'; +import {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop'; import {NavigationEnd, Router} from '@angular/router'; import {changeDetection} from '@demo/emulate/change-detection'; import {environment} from '@demo/environments/environment'; @@ -62,11 +62,14 @@ export class App extends AbstractDemo implements OnInit { protected readonly routes = DemoRoute; protected readonly playground = environment.playground; - protected readonly isLanding$ = this.router.events.pipe( - filter((event) => event instanceof NavigationEnd), - map(() => this.url === '' || this.url === '/'), - distinctUntilChanged(), - startWith(true), + protected readonly isLanding = toSignal( + this.router.events.pipe( + filter((event) => event instanceof NavigationEnd), + map(() => this.url === '' || this.url === '/'), + distinctUntilChanged(), + startWith(true), + ), + {initialValue: true}, ); public override async ngOnInit(): Promise { diff --git a/projects/demo/src/modules/app/app.template.html b/projects/demo/src/modules/app/app.template.html index d2c05f8531d3..1ccd85841fd7 100644 --- a/projects/demo/src/modules/app/app.template.html +++ b/projects/demo/src/modules/app/app.template.html @@ -1,4 +1,4 @@ - +