The BUG you're dealing with usually occurs because Angular doesn't recognize the router-outlet directive. This issue happens when the AppRoutingModule or the routing module containing the RouterModule isn't properly imported into the AppModule.You can solve this issue in the following way.
Ensure the AppRoutingModule is properly import in your AppModule like show below:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module'; // Import your routing module here
import { AppComponent } from './app.component';
import { LoginComponent } from './components/pages/login/login.component';
import { BeszerzesEszkozSelectorComponent } from './components/pages/beszerzes-eszkoz-selector/beszerzes-eszkoz-selector.component';
@NgModule(
{
declarations: [
AppComponent,
LoginComponent,
BeszerzesEszkozSelectorComponent
],
imports: [
BrowserModule,
AppRoutingModule // Make sure this is imported
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
You can find more about how to configure routing in Angular v16 and lower by following this link