migrate angular 21 finalize
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||
import {Component, OnDestroy, OnInit, inject} from '@angular/core';
|
||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||
import {ReactiveFormsModule, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
||||
import {SongService} from '../../services/song.service';
|
||||
@@ -19,6 +19,9 @@ import {ButtonComponent} from '../../../../widget-modules/components/button/butt
|
||||
imports: [CardComponent, ReactiveFormsModule, MatFormField, MatLabel, MatInput, ButtonRowComponent, ButtonComponent],
|
||||
})
|
||||
export class NewComponent implements OnInit, OnDestroy {
|
||||
private songService = inject(SongService);
|
||||
private router = inject(Router);
|
||||
|
||||
public faSave = faSave;
|
||||
public form: UntypedFormGroup = new UntypedFormGroup({
|
||||
number: new UntypedFormControl(null, Validators.required),
|
||||
@@ -26,11 +29,6 @@ export class NewComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
private subs: Subscription[] = [];
|
||||
|
||||
public constructor(
|
||||
private songService: SongService,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.form.reset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user