auto migrate standalone components
This commit is contained in:
@@ -9,8 +9,8 @@ describe('ButtonComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [ButtonComponent],
|
||||
}).compileComponents();
|
||||
imports: [ButtonComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'app-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.less'],
|
||||
imports: [
|
||||
MatButton,
|
||||
NgIf,
|
||||
FaIconComponent,
|
||||
],
|
||||
})
|
||||
export class ButtonComponent {
|
||||
@Input() public icon: IconProp | null = null;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {ButtonComponent} from './button.component';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
|
||||
@NgModule({
|
||||
declarations: [ButtonComponent],
|
||||
exports: [ButtonComponent],
|
||||
imports: [CommonModule, FontAwesomeModule, MatButtonModule],
|
||||
})
|
||||
export class ButtonModule {
|
||||
}
|
||||
Reference in New Issue
Block a user