auto migrate standalone components

This commit is contained in:
2025-01-05 10:26:35 +01:00
parent 8b8395fc3c
commit 54ee9a5b11
121 changed files with 947 additions and 685 deletions

View File

@@ -9,8 +9,8 @@ describe('BrandComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [BrandComponent],
}).compileComponents();
imports: [BrandComponent],
}).compileComponents();
}),
);

View File

@@ -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 {
}

View File

@@ -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 {
}

View File

@@ -9,8 +9,8 @@ describe('NewUserComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [NewUserComponent],
}).compileComponents();
imports: [NewUserComponent],
}).compileComponents();
}),
);

View File

@@ -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;