Error when integrating Ionic Auth service


#1

Hey All,

First of all happy new year 2017… :tada:.

I’m trying to integrate facebook login to my ionic 2 app. I was following the guide here and all is good until I stared to using Auth and User in the constructor.

The problem is , currently its complaining the typescript cannot find the name Auth and User. However I do import

import { Auth, User } from '@ionic/cloud-angular';

Following is my full 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');
  }

}

I’m running on

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

Can anyone help me to the right direction please.

cheers

Sam


#2

same issue for me but when i put it in constructor i am getting ionic/native issue . Did you get any solution?