So in my login component, I generate one token that gives me access to Tablaue dashboard from the angular app
so when I log in at that time only the home component method should call/run. but when I refresh the home page(component) should not run/call that method
Example
login-page.component.ts
public getToken(){
// i received token here
// then i move to the home page component
// saving token into the session
this.router.navigate(["/home"]);
}
home-page.component.ts
public tokenAccess(){
// this method will be run only once when I come from the login page.
// should not run when the page is refreshed or reloaded
}
Thank you