Does Angular provide a method to determine if the browser has been refreshed? I need to verify whether the page has been refreshed or not, as I want to run a function only when the value is false.
In my ngOnInit function, I have the following code:
pageIsRefreshed: Boolean;
ngOnInit() {
this.subscription.pipe().subscribe(res=> {
if(!pageIsRefreshed) {
dofunction();
}
})
}
However, I am struggling to find a solution to identify if the page has been refreshed or not.