This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi, I have an issue with a slide out infopanel in my application. I currently have <app-sidebar></app-sidebar> in my app.component.html and control whether or not it is shown with *ngIf.
This works great BUT when I need to show content based on a user being logged in and a resulting API call using their credentials it begins to fall to pieces as the OnInit() fires at application load rather than when I open the panel and the user isnβt logged in.
Can anyone recommend a good way around this. I have looked into ngcontent but am not sure if this is the right approach.
Ideally I need a solution where the OnInit fires each time the panel is activated in the same way a page based component would be when navigated to
Subreddit
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Angular2/co...