Conditional display of hero
{{hero.name}}
List of heroes
Expression is true and ngIf is true. This paragraph is in the DOM.
Expression is false and ngIf is false. This paragraph is not in the DOM.
Expression sets display to "block". This paragraph is visible.
Expression sets display to "none". This paragraph is hidden but still in the DOM.
<ng-template> element
template attribute
I turned the corner
I turned the corner and saw {{hero.name}}. I waved and continued on my way.
<select> with <span>
<select> with <ng-container>
<div *ngFor="let hero of heroes; let i=index; let odd=odd; trackBy: trackById" [class.odd]="odd">
<div template="ngFor let hero of heroes; let i=index; let odd=odd; trackBy: trackById" [class.odd]="odd">
<template ngFor let-hero [ngForOf]="heroes" let-i="index" let-odd="odd" [ngForTrackBy]="trackById">
Hip!
Hip!
Hooray!
The condition is currently {{condition}}.
(A) This paragraph is displayed because the condition is false.
(B) Although the condition is true, this paragraph is displayed because myUnless is set to false.
Show this sentence unless the condition is true.
(A) <p template="myUnless condition" class="code unless">
(A) <template [myUnless]="condition">