diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index f0107582a75..81a0b9427bf 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -16,7 +16,7 @@ const routes: Routes = [ }, { path: 'features', - loadChildren: () => import('./features/features.module').then((m) => m.FeaturesModule) + loadComponent: () => import('./features/features.component').then((m) => m.FeaturesComponent) }, { path: 'forgot', diff --git a/src/app/features/features-routing.module.ts b/src/app/features/features-routing.module.ts deleted file mode 100644 index 7a4515b28ad..00000000000 --- a/src/app/features/features-routing.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { FeaturesComponent } from './features.component'; - -const featuresRoutes: Routes = [{ path: '', component: FeaturesComponent }]; - -@NgModule({ - imports: [RouterModule.forChild(featuresRoutes)], - exports: [RouterModule] -}) -export class FeaturesRoutingModule {} diff --git a/src/app/features/features.component.spec.ts b/src/app/features/features.component.spec.ts index 4241a71ebad..4e0ac8b769a 100644 --- a/src/app/features/features.component.spec.ts +++ b/src/app/features/features.component.spec.ts @@ -1,18 +1,19 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; - import { FeaturesComponent } from './features.component'; +import { provideRouter } from '@angular/router'; describe('FeaturesComponent', () => { let component: FeaturesComponent; let fixture: ComponentFixture; - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [FeaturesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [FeaturesComponent], + providers: [provideRouter([])] + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(FeaturesComponent); diff --git a/src/app/features/features.component.ts b/src/app/features/features.component.ts index b547fbbb097..3cdd15c6c5c 100644 --- a/src/app/features/features.component.ts +++ b/src/app/features/features.component.ts @@ -1,12 +1,23 @@ -import { Component, OnInit } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Component } from '@angular/core'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatIconModule } from '@angular/material/icon'; +import { RouterModule } from '@angular/router'; @Component({ + imports: [ + CommonModule, + FlexLayoutModule, + MatButtonModule, + MatDividerModule, + MatIconModule, + RouterModule + ], selector: 'app-features', - templateUrl: './features.component.html', - styleUrls: ['./features.component.scss'] + standalone: true, + styleUrl: './features.component.scss', + templateUrl: './features.component.html' }) -export class FeaturesComponent implements OnInit { - constructor() {} - - ngOnInit() {} -} +export class FeaturesComponent {} diff --git a/src/app/features/features.module.spec.ts b/src/app/features/features.module.spec.ts deleted file mode 100644 index 33d10d08d6a..00000000000 --- a/src/app/features/features.module.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { FeaturesModule } from './features.module'; - -describe('FeaturesModule', () => { - let featuresModule: FeaturesModule; - - beforeEach(() => { - featuresModule = new FeaturesModule(); - }); - - it('should create an instance', () => { - expect(featuresModule).toBeTruthy(); - }); -}); diff --git a/src/app/features/features.module.ts b/src/app/features/features.module.ts deleted file mode 100644 index 5de6395816d..00000000000 --- a/src/app/features/features.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatIconModule } from '@angular/material/icon'; -import { FeaturesComponent } from './features.component'; -import { FeaturesRoutingModule } from './features-routing.module'; -import { SharedModule } from '../modules/shared/shared.module'; - -@NgModule({ - imports: [ - CommonModule, - FlexLayoutModule, - MatDividerModule, - MatIconModule, - FeaturesRoutingModule, - SharedModule - ], - declarations: [FeaturesComponent], - exports: [FeaturesComponent, SharedModule] -}) -export class FeaturesModule {}