We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Example on how the module.ts should be structured.
!WARNING: prefer using standalone instead
export function myFactory(_myService: MyService) { return async () => await _myService.init() } @NgModule({ imports: [ CommonModule, // <-- CommunModule, NgIf, NgFor, ... does not need any comments // Shared SharedModule, // <-- Barrel import : Do not overuse // Components <-- Alphabetical order ComponentModule, StandaloneComponent, // Fragments // Layouts // Modals // Pipes // Services // Vendors ], exports: [ ], providers: [ { provide: VARIABLE, useValue: `Johndo` }, { provide: APP_INITIALIZER, useFactory: myFactory, deps: [MyService], multi: true, }, AnyService, { provide: BaseService, useExisting: AnyService, }, ], })