Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Exception on filtered Firebase json data

$
0
0

@iamDoerr wrote:

Hi there,
i am a newbie on Ionic 2 and Angular 2. I try to learn and and make a simple app.
My Data are stored in Firebase and i am able to read and show the data in a simple master/detail view.

My problem is, when i add a firebase filter to the url (url.json + "?orderBy="lh_id"&equalTo=1") then i get this Exception:

EXCEPTION: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.

With this code, it works:

    this.http.get('https://blabla.firebaseio.com/blabla.json')
            .map(res => res.json())
            .subscribe(data => {
              // we've got back the raw data, now generate the core schedule data
              // and save the data for later reference
              this.data = data;
            });

but when i change the url to

                this.http.get('https://blabla.firebaseio.com/blabla.json?orderBy="lh_id"&equalTo=1')
             .map(res => res.json())
             .subscribe(data => {
               // we've got back the raw data, now generate the core schedule data
               // and save the data for later reference
               this.data = data;
             });

and try to list the data, then i get the Exception.
console.log(this.data) works with both versions.

I hope you can point me to the right direction. Thank you in advance

iamDoerr

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>