Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using <ng-template>
You will never see me :(
<ng-template *ngIf="showContents">
You still won’t see me (even though I’m using a structural directive, there’s nothing that's telling Angular to use me)
<ng-template *ngFor="let item of items">
No dice (same reason as *ngIf above)
<div *ngIf="!showTemplate else template">
<ng-template #template>
Finally I am seen! (When showTemplate is true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment