Ionic Storage - cant get Data from Storage-Array


#1

Hello everyone,

i need your help again :smiley:

I want to get some data from my Ionic Storage, where i set a JSON-Array. One the home-page i fetch some http-data from my api and then a barcode-scanner will find the right Array in the JSON-API-File and store it in the Ionic Storage. (That works fine!)

On the next page i get the JSON-like Data from my Storage but i cant get the first attributes :frowning:

page.ts:

information: boolean[];

ionViewDidLoad() {
    console.log('ionViewDidLoad StartseitePage');
      this.storage.get('rallyeData').then((data)=> {
      this.information = data;
      console.log(this.information);
    });

  }

html:

<!-- <div *ngFor="let information of information; let i = index;"> -->
  <ion-title>
    <div text-center >{{information.name}}</div>
  </ion-title>
    <div text-center>{{information.besch}}</div>
<!-- </div> -->

When i comment out the For-loop in html i get the JSON in my console.log:

Else when there is a For-loop i get the Error-Message: โ€œCannot find a differ supporting object โ€˜[object Object]โ€™ of type โ€˜objectโ€™. NgFor only supports binding to Iterables such as Arrays.โ€.

How can i get the yellow mark attributes from my Ionic Storage? Maybe someone can help me?

Greets!