Maybe add all the providers to the app.config.ts and then bootstrap using the config like this:
bootstrapApplication(AppComponent, appConfig) .catch((err) => console.error(err));