Hi,
in Ionic i have imported the native facebook plugin.
I have a Page:
import { Component } from ‘@angular/core’;
import { NavController, NavParams } from ‘ionic-angular’;
import { LoginEmailPage } from ‘…/login-email/login-email’;
import { AuthService } from ‘…/…/providers/auth-service’;
import { Facebook } from ‘ionic-native’;
…
…
export class LoginPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {}
Facebook.login(["public_profile", "email", "user_location", "user_birthday"])
.then(function(response){
this.navCtrl.push(LoginEmailPage);
}
})
The login work correctly but i have the following error:
EXCEPTION: Uncaught (in promise): TypeError: Cannot read property ‘navCtrl’ of null
TypeError: Cannot read property ‘navCtrl’ of null
What’s the problem?