【发布时间】:2017-05-17 15:07:03
【问题描述】:
我在控制台编译后运行时遇到这个问题。
未捕获的错误:无法解析 GoogleAuth 的所有参数:(?)
这就是我在名为 googleServices.ts 的服务中所做的事情
// Core
import { Injectable } from '@angular/core';
import { GoogleAuth, User } from '@ionic/cloud-angular';
import { LoadingController, Events } from 'ionic-angular';
// Plugins
import { Firebase } from '@ionic-native/firebase';
@Injectable()
export class GoogleAuthServices {
userImg;
profile_picture;
fullName;
pushToken;
status;
constructor(
public googleAuth: GoogleAuth,
public user: User,
public loadingCtrl: LoadingController,
public events: Events
) {}
signIn(): Promise<any>{
let loading = this.loadingCtrl.create({
content: 'Please wait...'
});
return this.googleAuth.login().then((userRes)=>{
loading.present();
alert(JSON.stringify(userRes));
loading.dismiss();
});
}
}
我大量寻找解决方案。
请帮忙
【问题讨论】:
标签: ionic-framework ionic2 google-authentication