mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
refactor: review fix
This commit is contained in:
@@ -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())],
|
||||
};
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user