ionic-team / legacy-ionic-cloud

JavaScript Client for legacy Ionic Cloud services. See Ionic Pro for our new take on the ionic development lifecycle
Apache License 2.0
65 stars 26 forks source link

Ionic DB: undefined auth type #167

Open Ryan-Gordon opened 7 years ago

Ryan-Gordon commented 7 years ago

Hi guys, Using the Ionic DB service from the tutorial at https://docs.ionic.io/services/database/#setup Currently only have 3 lines related to DB:

import {Database} from '@ionic/cloud-angular';
this.db.connect();
this.db.collection('questions').watch().subscribe( (data) => { 
//handle data
}

Getting an error however

EXCEPTION: undefined is not an object (evaluating '_this.settings.authType')

Wondering does DB have any dependancies I'm missing? Such as depending on Ionic Auth which I'm not using as of yet. Or could this be a bug with DB

Ryan-Gordon commented 7 years ago

Possible there is a dependancy , I imported Auth into my NGModule as provider now it gives a new error of undefined deps.config

davidqqq commented 7 years ago

Did you inject database service as :

constructor (public db: Database)

Did you configure your cloud settings in app.module.ts?