Encountering an issue with ActivatedRoute
while running the ng serve
command on my Angular project:
Error: NG0204: Can't resolve all parameters for ActivatedRoute: (?, ?, ?, ?, ?, ?, ?, ?).
at getUndecoratedInjectableFactory (core.mjs:9296:15)
at injectableDefOrInjectorDefFactory (core.mjs:9286:16)
at providerToFactory (core.mjs:9332:52)
at providerToRecord (core.mjs:9316:25)
at R3Injector.processProvider (core.mjs:9213:24)
at core.mjs:9041:59
at forEachSingleProvider (core.mjs:9387:13)
at forEachSingleProvider (core.mjs:9384:13)
at new R3Injector (core.mjs:9041:9)
at createInjectorWithoutInjectorInstances (core.mjs:10612:12)
(
Suddenly facing this error after updating Angular, without any previous indication of a problem. The IDE isn't showing any errors either.
import { Routes, RouterModule, ActivatedRoute } from '@angular/router';
@NgModule({
declarations: [
AppComponent,
PropertyCardComponent,
PropertyListComponent,
NavBarComponent,
AddPropertyComponent,
PropertyDetailsComponent
],
imports: [
BrowserModule,
HttpClientModule,
RouterModule,
FormsModule
],
providers: [ActivatedRoute],
bootstrap: [AppComponent]
Seeking advice from ChatGPT, but still unable to resolve the issue. Ideally, it should display a list of properties under path: ''
, however, I'm stuck with the parameter error mentioned above.