Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

StaticInjectorError(Platform: core)[l -> n]: NullInjectorError: No provider for n! #1515

Open
haihuo0910 opened this issue Feb 27, 2019 · 1 comment

Comments

@haihuo0910
Copy link

Ionic:

ionic (Ionic CLI) : 4.9.0 (C:\Users\lyh\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.2.3

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 6 other plugins)

System:

NodeJS : v10.15.0 (E:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 8.1

开始的时候没有问题,
安装:
screen-orientation
实例化:
constructor(
public router: Router,
public activeRoute: ActivatedRoute,
private http: HttpService,
private modalCtrl: ModalController,
private navParams: NavParams,
private screenOrientation: ScreenOrientation,
private platform: Platform
) {
// this.cid = navParams.get('cid');
}

之后就报这个错误了,哪位知道是什么原因?

@cnkker
Copy link

cnkker commented Apr 16, 2020

add ScreenOrientation providers at app.module.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants