Replace @Input with input decorator in FormsComponent

This commit is contained in:
akastijn 2026-03-01 02:36:08 +01:00
parent d67f1a4f87
commit d4b09a500f
2 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
<ng-container>
<app-header [current_page]="currentPage" height="200px" background_image="/public/img/backgrounds/staff.png"
<app-header [current_page]="currentPage()" height="200px" background_image="/public/img/backgrounds/staff.png"
[overlay_gradient]="0.5">
<div class="title" header-content>
<h1>{{ formTitle }}</h1>
<h1>{{ formTitle() }}</h1>
</div>
</app-header>
<main>

View File

@ -1,4 +1,4 @@
import {Component, Input} from '@angular/core';
import {Component, input} from '@angular/core';
import {HeaderComponent} from '@header/header.component';
import {RouterLink} from '@angular/router';
@ -12,6 +12,6 @@ import {RouterLink} from '@angular/router';
styleUrl: './forms.component.scss'
})
export class FormsComponent {
@Input() formTitle: string = 'Form';
@Input() currentPage: string = 'forms';
formTitle = input<string>('Form');
currentPage = input<string>('forms');
}