how to access THIS in cordova plugin with IONIC
问题 i am trying to implement the apple-sign-in method using a cordova plugin and set the credentials to firebase. what i actually have is: constructor ( public afAuth: AngularFireAuth, public afs: AngularFirestore, @Inject(FirebaseApp) firebase: any ){ this.firebase = firebase; } loginApple(): Promise<boolean> { return new Promise((resolve, reject) => { cordova.plugins.SignInWithApple.signin({ requestedScopes: [0, 1] }, function(succ){ var provider = new firebase.auth.OAuthProvider('apple.com')