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

How to update property of singleton for display in template?

$
0
0

@edanweis wrote:

I am trying to locally store a username by updating this.username property of a global (singleton?) User service component, which is rendered as {{username}}.

But when I update this.username from another component, the change is not reflected in my {{username}} template tag upon entering a new page (once the user logs in). I have included User in the array of @App providers to give it global scope.

Could I be instancing a new User service, rather than modifying it? I've tried Angular 2 singleton service and other tutes, without luck.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles