These are chat archives for angular/angular-2-ionic-2

4th
Jul 2016
Dale
@Lindstrom1989
Jul 04 2016 09:55
Hey i keep getting the error checkAuthenticationStatus is not a function when i try and call it here, why is this happening?
  constructor(private platform:Platform) {
    this.rootPage = TabsPage;
    this.userAuth = UserAuth;

    const config = {
      apiKey: “***",
      authDomain: “***",
      databaseURL: “***",
      storageBucket: “***",
    };
    firebase.initializeApp(config);

    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      StatusBar.styleDefault();

      this.userAuth.checkAuthenticationStatus();
    });
  }
}

ionicBootstrap(MyApp, [UserAuth, FirebaseService, CompanyService, InStoreService, GetUserService, GoogleMapService], {});
scarmarco
@scarmarco
Jul 04 2016 11:54
@Lindstrom1989 Add to providers:
Dale
@Lindstrom1989
Jul 04 2016 11:57
@scarmarco I managed to figure it out in the end, the new ionic way you don’t list the providers in app.ts you bootstrap the classes instead, when i included it in the constructor i was having isues that I was calling a service before firebase was setup which it requires. That was a bit of a loop so i setup firebase in a seperate service which i put in the constructor before UserAuth which cured it.
scarmarco
@scarmarco
Jul 04 2016 13:15
try a ngOnInit on app.ts
@Lindstrom1989
and make the call there
Dale
@Lindstrom1989
Jul 04 2016 13:45
I’m having trouble generating resources in ionic 2 by calling “resources” in the cli, it uploads and creates the images but doesn’t seem to save them locally or modify the config.xml