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

Show Tutorial only when application is running for the first time

$
0
0

@jagerOrNot wrote:

Hi !
I got a little problem with my code.
I would like to show a tutorial only if the app is opened for the first time and when user goes on ‘25 foot walk’ page
Here is the code I tried:

export class Survey_25footPage {
  constructor(public navCtrl: NavController, public storage: Storage) {
    if(localStorage.getItem['firstTimeLoad']!='TRUE'){
      localStorage.setItem['firstTimeLoad']='TRUE';
      this.navCtrl.setRoot(TutorialPage); 
  }

The tutorial (because it’s in constructor ?) is called everytime and when i skip the tutorial, it shows again…

What should I do to fix that ?
Thanks a lot for your time !

Posts: 1

Participants: 1

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>