I am trying to migrate an existing Ionic v8 app from Angular 16 to Angular 17. After moving all components to be standalone, I am stuck with awesome-cordova-plugins.
In the old Angular 16 version I used NgModules in app.modules.ts and the awesome-cordova-plugins were specified in the providers array:
@NgModule({
...
providers: [
FirebaseX,
Calendar,
SocialSharing,
BarcodeScanner,
...
],
exports: [
],
bootstrap: [AppComponent]
})
In the new Angular 17 version I use ApplicationConfig in main.ts:
providers: [
...
importProvidersFrom([
FirebaseX,
Calendar,
SocialSharing,
BarcodeScanner,
...
]),
...
]
This code compiles but when start my app with ionic serve I get this error message:
main.ts:17 ERROR NullInjectorError: R3InjectorError(Standalone[AppComponent])[FirebaseX -> FirebaseX -> FirebaseX]:
NullInjectorError: No provider for FirebaseX!
Is that the correct way to setup awesome-cordova-plugins with ApplicationConfig? Why does the error occur?