Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230087

Ionic 2 storage - get all stored keys forEach method

$
0
0

in your .ts file:

extractData () {

this.storage.get ('name of your key'). then ((val) => {

      this.Content = val;

      this.Reports = [this.Content];

          });
    }

in your .html file (use *ngFor )

<ion-list>
     <ion-item *ngFor="let report of Reports;" tappable>
         <ion-avatar item-left>
           <img src="img/camarista.png"> 
        </ion-avatar>
        <ion-label text-wrap>
            <h1>
                <span col-10 class="informe">{{report.title}}  <!--
You get the value of an element contained in the array -->
                  <ion-icon name="arrow-forward"></ion-icon></span>
              
            </h1>
            

        </ion-label>
      </ion-item>
    </ion-list>

(the additional elements depend on your need)


Viewing all articles
Browse latest Browse all 230087

Trending Articles



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