auto migrate standalone components
This commit is contained in:
@@ -9,8 +9,8 @@ describe('NewComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [NewComponent],
|
||||
}).compileComponents();
|
||||
imports: [NewComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
||||
import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import {SongService} from '../../services/song.service';
|
||||
import {Song} from '../../services/song';
|
||||
import {Router} from '@angular/router';
|
||||
import {Subscription} from 'rxjs';
|
||||
import { CardComponent } from '../../../../widget-modules/components/card/card.component';
|
||||
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { ButtonRowComponent } from '../../../../widget-modules/components/button-row/button-row.component';
|
||||
import { ButtonComponent } from '../../../../widget-modules/components/button/button.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new',
|
||||
templateUrl: './new.component.html',
|
||||
styleUrls: ['./new.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-new',
|
||||
templateUrl: './new.component.html',
|
||||
styleUrls: ['./new.component.less'],
|
||||
imports: [
|
||||
CardComponent,
|
||||
ReactiveFormsModule,
|
||||
MatFormField,
|
||||
MatLabel,
|
||||
MatInput,
|
||||
ButtonRowComponent,
|
||||
ButtonComponent,
|
||||
],
|
||||
})
|
||||
export class NewComponent implements OnInit, OnDestroy {
|
||||
public faSave = faSave;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NewComponent} from './new.component';
|
||||
import {CardModule} from '../../../../widget-modules/components/card/card.module';
|
||||
import {ReactiveFormsModule} from '@angular/forms';
|
||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {ButtonRowModule} from '../../../../widget-modules/components/button-row/button-row.module';
|
||||
import {ButtonModule} from '../../../../widget-modules/components/button/button.module';
|
||||
import {AutofocusModule} from '../../../../widget-modules/directives/autofocus/autofocus.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [NewComponent],
|
||||
imports: [CommonModule, CardModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, ButtonRowModule, ButtonModule, AutofocusModule],
|
||||
})
|
||||
export class NewModule {
|
||||
}
|
||||
Reference in New Issue
Block a user