打字稿编译器给了我这个错误
typescript: src/pages/login/login.ts,line: 33
Expected 0 arguments,but got 2.
L32: this.auth.loginAPI(this.registerCredentials)
L33: .subscribe(response => {
// auth-provider.ts public loginAPI(credentials: {email:string,password:string}) { return this.http.post(this.apiUrl,data); } // login.ts this.auth.loginAPI(this.registerCredentials) .subscribe(response => { console.log(response); },err => { console.log(err); });
有趣的是代码工作(我编辑任何文件,我的离子服务器重新加载和页面呈现没有任何问题).
任何的想法?
环境
cli包:(/usr/local/lib / node_modules)
@ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0
全球套餐:
cordova (Cordova CLI) : 7.0.1
本地包裹:
@ionic/app-scripts : 3.1.5 Cordova Platforms : ios 4.4.0 Ionic Framework : ionic-angular 3.9.2
系统:
Node : v8.9.3 npm : 5.5.1 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40b