Lots of tutorials show how we can use ViewContainerRef to dynamically insert a component to implement widgets like a dialog pop-up. (eg. https://www.lucidchart.com/techblog/2016/07/19/building-angular-2-components-on-the-fly-a-dialog-box-example/)
I was wondering what are the benefits over just using an *ngIf ? I could just:
<my-dialog-component *ngIf="someFlagControlledByAService"></my-dialog-component>
which could save many lines of code
Thanks a lot!