auto migrate standalone components
This commit is contained in:
@@ -9,8 +9,8 @@ describe('BrandComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [BrandComponent],
|
||||
}).compileComponents();
|
||||
imports: [BrandComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import {Component} from '@angular/core';
|
||||
import { LogoComponent } from '../../widget-modules/components/logo/logo.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-brand',
|
||||
templateUrl: './brand.component.html',
|
||||
styleUrls: ['./brand.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-brand',
|
||||
templateUrl: './brand.component.html',
|
||||
styleUrls: ['./brand.component.less'],
|
||||
imports: [LogoComponent],
|
||||
})
|
||||
export class BrandComponent {
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {BrandComponent} from './brand.component';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {LogoModule} from '../../widget-modules/components/logo/logo.module';
|
||||
|
||||
import {NewUserComponent} from './new-user/new-user.component';
|
||||
|
||||
const routes: Routes = [
|
||||
@@ -18,8 +18,7 @@ const routes: Routes = [
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [BrandComponent, NewUserComponent],
|
||||
imports: [CommonModule, RouterModule.forChild(routes), LogoModule],
|
||||
imports: [CommonModule, RouterModule.forChild(routes), BrandComponent, NewUserComponent],
|
||||
})
|
||||
export class BrandModule {
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ describe('NewUserComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [NewUserComponent],
|
||||
}).compileComponents();
|
||||
imports: [NewUserComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -2,12 +2,18 @@ import {Component} from '@angular/core';
|
||||
import {UserService} from '../../../services/user/user.service';
|
||||
import {Observable} from 'rxjs';
|
||||
import {User} from '../../../services/user/user';
|
||||
import { BrandComponent } from '../brand.component';
|
||||
import { NgIf, AsyncPipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-user',
|
||||
templateUrl: './new-user.component.html',
|
||||
styleUrls: ['./new-user.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-new-user',
|
||||
templateUrl: './new-user.component.html',
|
||||
styleUrls: ['./new-user.component.less'],
|
||||
imports: [
|
||||
BrandComponent,
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
],
|
||||
})
|
||||
export class NewUserComponent {
|
||||
public user$: Observable<User | null> | null = null;
|
||||
|
||||
Reference in New Issue
Block a user