I have been working on integrating Facebook login into my Ionic 2 app. I followed the instructions in this guide and everything was going smoothly until I encountered an issue with using Auth
and User
in the constructor.
The problem I am facing is that TypeScript cannot recognize the names Auth
and User
. Although I have imported them as shown below:
import { Auth, User } from '@ionic/cloud-angular';
Below is a snippet of my code:
import { Component } from '@angular/core';
import { Auth, User } from '@ionic/cloud-angular';
import { NavController, NavParams } from 'ionic-angular';
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
constructor(public auth: Auth, public user: User, public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad LoginPage');
}
}
https://i.sstatic.net/cBcO2.png
My environment details are:
Ionic Framework: 2.0.0-rc.4
Ionic Native: 2.2.11
Ionic App Scripts: 0.0.47
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.1.0
OS Platform: OS X El Capitan
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36