@codiqa100095421 wrote:
Hello, i’m beginner and i’m doing a angular tutorial,
To see if there are a user token in cache i call this on the .tsngOnInit(){
this._userProvider.getIdentity();
}
ngDoCheck(){
this.identity = this._userProvider.getIdentity();
}// in html to show if there are a user
*ngIf=“identity”The problem is that if i use it on the app.component.ts or app.module.ts dosn’t work on the pages.
To make it work on the pages i need to call them in each page .ts
There are a way to call this functions only once and use it in all html pages(I m using lazyloding)?
Thanks
Posts: 1
Participants: 1