title: ionic3- How to save data in localstorage and retrieve data in next page
body: <p>How to save data in localstorage and retrieve data in next page.I don't know How 
  to do This?When I Tried The following code I get the data(voter_id)in console 
  successfully but data is not displayed on <code>home.html</code> page</p>
  
  <p><b>Here is my code</b></p>
  
  <p><B>check.html</b></p>
  
  <pre><code>&lt;ion-header&gt;
  &lt;ion-navbar&gt;
  &lt;ion-title&gt;check&lt;/ion-title&gt;
  &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
  &lt;ion-content padding&gt;
  &lt;ion-list&gt;
   &lt;ion-item&gt;
  &lt;ion-label floating&gt;voter_id&lt;/ion-label&gt;
  &lt;ion-input type="text" value="" [(ngModel)]="userData.voter_id"&gt;&lt;/ion-input&gt;
  &lt;/ion-item&gt;
  &lt;/ion-list&gt;
  &lt;button ion-button full color="lightText" (click)="check()"&gt;submit&lt;/button&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p><b>Check.ts</b></p>
  
  <pre><code>import { Component } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  import { Storage } from '@ionic/storage';
  import { HomePage } from '../home/home';
  @IonicPage()
  @Component({
  selector: 'page-check',
  templateUrl: 'check.html',
  })
  export class CheckPage {
  userData:any={
  'voter_id':''
  };
  constructor(public navCtrl: NavController, public navParams: NavParams, 
  private storage: Storage) {       
  }
  ionViewDidLoad() {
  console.log('ionViewDidLoad CheckPage');
  }
  check()
  {
     window.localStorage.setItem('voter_id', this.userData.voter_id);
     let voterId= window.localStorage.getItem('voter_id');
    console.log(window.localStorage.getItem('voter_id'));
  
    this.navCtrl.push(HomePage);
          }
     }
  </code></pre>
  
  <p>From check page I need to save data(voter_id) into localStorage and retrieve that data(voter_id) in next page <code>home.html</code>.Here I need to display the data in homepage(near voter_id in <code>home.html</code> page) not in console. How to do this? I don't whether I need to add anything in <code>home.html</code> and <code>home.ts</code> to retrieve data </p>
  
  <p><b>home.html</b></p>
  
  <pre><code>&lt;ion-item&gt;
    voter_id : 
  &lt;/ion-item&gt;
  </code></pre>