Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70747

Lazy loding use user identity all pages?

$
0
0

@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 .ts

ngOnInit(){
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

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>