Google Auth, problem compiling


#1

Following the ionic cloud help, I integrated the Google Auth. But the solution fails to compile with
> Error: Error at /Users/arash/Src/ionic/camera/shopping/.tmp/pages/Login/Login.ts:10:34

[00:34:51] Cannot find name ‘GoogleAuth’.
[00:34:51] Error at /Users/arash/Src/ionic/camera/shopping/.tmp/pages/Login/Login.ts:10:34
[00:34:51] Parameter ‘googleAuth’ of constructor from exported class has or is using private name ‘GoogleAuth’.
[00:34:51] Error at /Users/arash/Src/ionic/camera/shopping/.tmp/pages/Login/Login.ts:10:59
[00:34:51] Cannot find name ‘User’.

My code simply looks like:

import { Component } from '@angular/core';
import { GoogleAuth, User } from '@ionic/cloud-angular';


@Component({
    selector: 'login',
    templateUrl : 'login.html'
})
export class LoginPage {
  constructor(public googleAuth: GoogleAuth, public user: User) {
  }

  login(){
      this.googleAuth.login().then(
          ()=>{
              console.log("salaaaam");
          }
      );

  }
}

#2

It was a project setup problem.


#3

Can you describe the solution some? I’m experiencing the same problem trying to convert a Beta 11 app to RC 1.


#4

Just follow the setup in the ionic cloud documentation setup section. You need to create an object and add it to angular bootstrapping.
If it didn’t work, I can send you my setup when I am at my PC.