auto migrate standalone components
This commit is contained in:
@@ -9,8 +9,8 @@ describe('GuestComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [GuestComponent],
|
||||
}).compileComponents();
|
||||
imports: [GuestComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -4,12 +4,22 @@ import {ActivatedRoute} from '@angular/router';
|
||||
import {map, switchMap} from 'rxjs/operators';
|
||||
import {Song} from '../songs/services/song';
|
||||
import {ConfigService} from '../../services/config.service';
|
||||
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||
import { SongTextComponent } from '../../widget-modules/components/song-text/song-text.component';
|
||||
import { ShowTypePipe } from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-guest',
|
||||
templateUrl: './guest.component.html',
|
||||
styleUrls: ['./guest.component.less'],
|
||||
standalone: false,
|
||||
selector: 'app-guest',
|
||||
templateUrl: './guest.component.html',
|
||||
styleUrls: ['./guest.component.less'],
|
||||
imports: [
|
||||
NgIf,
|
||||
NgFor,
|
||||
SongTextComponent,
|
||||
AsyncPipe,
|
||||
DatePipe,
|
||||
ShowTypePipe,
|
||||
],
|
||||
})
|
||||
export class GuestComponent {
|
||||
public show$ = this.currentRoute.params.pipe(
|
||||
|
||||
@@ -6,18 +6,18 @@ import {SongTextComponent} from '../../widget-modules/components/song-text/song-
|
||||
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
|
||||
@NgModule({
|
||||
declarations: [GuestComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: ':id',
|
||||
component: GuestComponent,
|
||||
},
|
||||
]),
|
||||
SongTextComponent,
|
||||
ShowTypePipe,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: ':id',
|
||||
component: GuestComponent,
|
||||
},
|
||||
]),
|
||||
SongTextComponent,
|
||||
ShowTypePipe,
|
||||
GuestComponent,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
export class GuestModule {}
|
||||
|
||||
Reference in New Issue
Block a user