Replace @Input with input decorator in FormsComponent
This commit is contained in:
parent
d67f1a4f87
commit
d4b09a500f
|
|
@ -1,8 +1,8 @@
|
||||||
<ng-container>
|
<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">
|
[overlay_gradient]="0.5">
|
||||||
<div class="title" header-content>
|
<div class="title" header-content>
|
||||||
<h1>{{ formTitle }}</h1>
|
<h1>{{ formTitle() }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</app-header>
|
</app-header>
|
||||||
<main>
|
<main>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, input} from '@angular/core';
|
||||||
import {HeaderComponent} from '@header/header.component';
|
import {HeaderComponent} from '@header/header.component';
|
||||||
import {RouterLink} from '@angular/router';
|
import {RouterLink} from '@angular/router';
|
||||||
|
|
||||||
|
|
@ -12,6 +12,6 @@ import {RouterLink} from '@angular/router';
|
||||||
styleUrl: './forms.component.scss'
|
styleUrl: './forms.component.scss'
|
||||||
})
|
})
|
||||||
export class FormsComponent {
|
export class FormsComponent {
|
||||||
@Input() formTitle: string = 'Form';
|
formTitle = input<string>('Form');
|
||||||
@Input() currentPage: string = 'forms';
|
currentPage = input<string>('forms');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user