title: Cannot read property 'set' of undefined(…) Secure Storage Ionic 2
body: <p>Actually I'm working with ionic 2 and <a href="http://ionicframework.com/docs/v2/native/secure-storage/" rel="nofollow">Secure Storage</a>, What I did, first of all</p>
  
  <pre><code>ionic plugin add cordova-plugin-secure-storage
  </code></pre>
  
  <p>After I installed the plugin, </p>
  
  <pre class="lang-js prettyprint-override"><code>import { Component }        from '@angular/core';
  import { NavController }    from 'ionic-angular';
  import { Platform}          from 'ionic-angular';
  import { AlertController }  from 'ionic-angular';
  
  import { Facebook}          from 'ionic-native';
  import { SecureStorage }    from 'ionic-native';
  
  import { TourPage }         from '../tour/tour';
  import { HomePage }         from '../home/home';
  import { LoginService }     from './login.service';
  
  
  @Component({
    selector: 'page-login',
    templateUrl: 'login.html',
    providers: [LoginService]
  })
  export class LoginPage {
    tourPage = TourPage;
    secureStorage:SecureStorage = new SecureStorage();
  
    constructor(public nav: NavController,
                public alert: AlertController,
                public loginService:LoginService
               ) {
  
      this.secureStorage.create('mibank').then(
        () =&gt; console.log('Storage is ready!'),
        error =&gt; console.log(error)
      );
    }
  
    loginFb(){
      ...
  
      var self = this;
      self.loginService.register(token).subscribe(
          (user)=&gt;{ self.saveUser(user)},
          error =&gt; console.error(`Error: ${error}`));
    }    
  
    saveUser(user:any) {
      console.log('save user...',user);
      this.secureStorage.set('token',user.token).then(
          data =&gt; {
              return this.secureStorage.get('tourShown');
          },
          error =&gt; console.log(error)
      ).then( (tourShown)=&gt; {
          console.log('is tour shown?: ',tourShown);
          if(tourShown){
            this.nav.setRoot(HomePage);
          }else{
            this.nav.setRoot(TourPage);
          }
      });
    }
  }
  </code></pre>
  
  <p>I always get the error </p>
  
  <pre><code> Cannot read property 'set' of undefined(…)
  </code></pre>
  
  <p>What is wrong in the above code? </p>