I recently attempted to implement routing and lazy loading in Angular 10.1.6, but for some unknown reason, I've encountered issues where the routing and lazy loading of a module simply isn't functioning as expected. Despite referring to the official example on the Angular website, I haven't been able to identify the problem even after numerous attempts to troubleshoot.
Here is a snippet of my App.module:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { EventsComponent } from './events/events.component';
@NgModule({
declarations: [AppComponent, EventsComponent],
imports: [BrowserModule, AppRoutingModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
If you'd like to take a closer look at the full project code, it can be found here: https://bitbucket.org/Anirudh_Nandavar/lazyload_angular/src/master/
Any assistance or insights you could provide would be greatly appreciated. Thank you!