Allow popover content to be lazily instantiated
See original GitHub issueHey!
I’ve noticed that if you have a component as your sat-popover content, that the component is actually initialized, even though the popover isn’t opened yet.
At first I thought this was a regression based on this comment you made from a previous conversation we had, but I was playing around on StackBlitz and rolled back a few versions and saw the same behaviour regardless.
Demo of issue: https://stackblitz.com/edit/sat-popover-issues-vicsu1
You can see that the ngOnInit of the popover-content component is called even before the button is clicked to display it.
This is an issue for us because our popover content component makes an http request. So the request is being made even before the user has shown any interest in viewing that content.
We can easily work around it by using the isOpen() method combined with *ngIf, but I thought I’d mention the issue since it seems like from your previous comment this behaviour may not be intended.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:12 (9 by maintainers)

Top Related StackOverflow Question
I’ll take a look at them and give it a try. I’ll come back to you in case of trouble with the overall process.
No, I mean I tried building locally from scratch some of the different PRs, some things not working. The workaround you mentioned talked about some of the code being merged w/o proper tests, so it seems there’s an opportunity to add another PR to fix a couple of these issues. Looking for some help with that.