1

I need to reload my page only once Here is what i tried so far...

  • like using location.reload(); but it Goes in a loop and keeps on reloading .
  • then I tried setting a Storage Variable.

    storage.set('reload_flag',false);

in Constructor of traget Page I wrote This Line

`storage.get('reload_flag').then((val) => {
        if (!val) {
            // do Nothing
        }
    else{
        location.reload();
    }});`

But the Results are not as expected (the Constructor part is not working).

  • but if i used on-Refresher it will work but its not the appropriate way

    doRefresh(refresher) { console.log('Begin async operation', refresher); location.reload(); // Reloadin The Page setTimeout(() => { console.log('Async operation has ended'); refresher.complete(); }, 2000); }

2
  • 1
    Is "flase" a spelling mistake in your code or just in your question? Commented Jul 10, 2018 at 9:53
  • not workink even after changing the spelling Commented Jul 10, 2018 at 10:49

1 Answer 1

1

try this :

this.navCtrl.setRoot(this.navCtrl.getActive().component);
Sign up to request clarification or add additional context in comments.

1 Comment

where to add this line exactly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.