I created an EF Core + Angular application. Then, I added a custom module using the ABP suite named Start It created backend projects in the aspnet-core/modules folder and angular project in the angular/projects folder.
first, i edited tsconfig.json:
"@top-tis.project-name/start": [ "projects/TopTis.project-name.Start/projects/start/src/public-api.ts" ], "@top-tis.project-name/start/config": [ "projects/TopTis.project-name.Start/projects/start/config/src/public-api.ts" ],
I added lazy loading of this new module in my main app-routing.module.ts:
{ path: 'start', loadChildren: () => import('@top-tis.project-name/start').then(m => m.StartModule.forLazy()), }
Then, Imported the ConfigModule in my app.module.ts
StartConfigModule.forRoot(),
At last, I added a route in my route.provider.ts
{ path: '/start', name: 'StartMenu' }
http://localhost:4200/start Dos not work and I have the below error in the console
core.mjs:6494 ERROR Error: Uncaught (in promise): Error: NG0203: inject() must be called from an injection context Error: NG0203: inject() must be called from an injection context at injectInjectorOnly (core:4768:1) at Module.ɵɵinject (core:4778:1) at Object.RouterModule_Factory [as factory] (router.mjs:5861:1) at R3Injector.hydrate (core.mjs:11494:1) at R3Injector.get (core.mjs:11313:1) at core.mjs:11351:1 at Set.forEach (<anonymous>) at R3Injector._resolveInjectorDefTypes (core.mjs:11351:1) at new NgModuleRef (core.mjs:21881:1) at NgModuleFactory.create (core.mjs:21935:1) at resolvePromise (zone.js:1211:1) at resolvePromise (zone.js:1165:1) at zone.js:1278:1 at _ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at _ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:585:1)