2

I searched all over google but I cannot find a correct solution actually. My requirement is to find whether a page loaded from a back button or just by normal routing.

I found a solution to check whether it's from a back button or not

fromEvent(window, 'popstate')
      .subscribe((e) => {
        console.log('popped route');
        this.backButtonService.isBackClick = true;
      });

I need a solution to find whether it is loaded from a normal routine.... Help me, guys :)

Vishal Parmar
  • 524
  • 7
  • 27
Gvs Akhil
  • 2,165
  • 2
  • 16
  • 33

0 Answers0