I would like to display different template in my component. Only one will show. If hasURL is true, I want to show the
hasURL
true
You can wrap ng-content in ng-template and use ngTemplateOutlet
ng-content
ng-template
ngTemplateOutlet
Plunker Example
See also
Angular 9 demo