From the Ionic Native docs:
Ionic Native has its own internal logic to detect if it is inside of a native environment. Instead of throwing a runtime error, it will print a warning if it is not a native environment and there are no Cordova plugins available. The app won’t break and it will continue to work, although without the native functionality.
But as soon as I add Ionic Native Badge,
ionic serve gives a white screen.
The Chrome console gives this error:
Error: This constructor is not compatible with Angular Dependency Injection because its dependency at index 3 of the parameter list is invalid. This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator. Please check that 1) the type for the parameter at index 3 is correct and 2) the correct Angular decorators are defined for this class and its ancestors. at ɵɵinvalidFactoryDep (core.js:974) at NodeInjectorFactory.AppComponent_Factory [as factory] (ɵfac.js? [sm]:1) at getNodeInjectable (core.js:5993) at instantiateRootComponent (core.js:12819) at createRootComponent (core.js:26475) at ComponentFactory$1.create (core.js:34097) at ApplicationRef.bootstrap (core.js:43095) at core.js:42683 at Array.forEach (<anonymous>) at PlatformRef._moduleDoBootstrap (core.js:42679)
The app works fine on device, but it’s nice to have
ionic serve for quick visual testing. Any solutions or workarounds to using Badge (or maybe other native plugins) and keep
ionic serve working?