refactor: review fix

This commit is contained in:
Timothy Alcaide
2024-04-10 21:06:29 +02:00
committed by thomas
parent b00ce23792
commit 7cadcc1cf6
4 changed files with 13 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
import { ApplicationConfig } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideRouter, withComponentInputBinding } from '@angular/router';
import { appRoutes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [provideRouter(appRoutes)],
providers: [provideRouter(appRoutes, withComponentInputBinding())],
};

View File

@@ -1,7 +1,4 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { toSignal } from '@angular/core/rxjs-interop';
import { ActivatedRoute } from '@angular/router';
import { map } from 'rxjs';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
@Component({
standalone: true,
@@ -13,5 +10,5 @@ import { map } from 'rxjs';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PageComponent {
title = toSignal(inject(ActivatedRoute).data.pipe(map((d) => d['title'])));
title = input.required<string>();
}