You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
ERROR Error: StaticInjectorError(AppModule)[Contacts]: StaticInjectorError(Platform: core)[Contacts]: NullInjectorError: No provider for Contacts! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8895) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveNgModuleDep (core.js:21217) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21906) at injectInjectorOnly (core.js:1773)
This is basic angular and has nothing to do with this plugin. You always need to add an import inside app.module.ts and add it to the Providers array.
I'm not sure if that's so clear to everyone. The documentation of the plugins doesn't tell about this. And from angular you could expect, that Injectable could be provided at root and would not need any provider declaration.
The documentation of the plugins doesn't tell about this.
We don't document any details on any particular framework. Doing so would be a major hurdle in maintenance, especially for the small volunteer team that we are. Cordova documents the API that Cordova defines and any potential quirks you may run into on a particular OS / webview platform. Anything outside of that is out of scope.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug Report
Problem
I followed the documentation of the link https://ionicframework.com/docs/native/contacts but when running on the device I get the error 'NullInjectorError: No provider for Contacts!'
Chrome Inspect Log
ERROR Error: StaticInjectorError(AppModule)[Contacts]: StaticInjectorError(Platform: core)[Contacts]: NullInjectorError: No provider for Contacts! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8895) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveNgModuleDep (core.js:21217) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21906) at injectInjectorOnly (core.js:1773)
Ionic Info
`Ionic:
ionic (Ionic CLI) : 4.12.0 (C:\Users\Leandro\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.1.1
@angular-devkit/build-angular : 0.13.5
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.5
@ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : not available
System:
Android SDK Tools : 26.1.1 (C:\Users\Leandro\AppData\Local\Android\Sdk)
NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)
npm : 6.7.0
OS : Windows 7`
The text was updated successfully, but these errors were encountered: