NgSwitch

Stable

Directive

What it does

Adds / removes DOM sub-trees when the nest match expressions matches the switch expression.

How to use

<container-element [ngSwitch]="switch_expression"> <some-element *ngSwitchCase="match_expression_1">...</some-element> <some-element *ngSwitchCase="match_expression_2">...</some-element> <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> <ng-container *ngSwitchCase="match_expression_3"> <!-- use a ng-container to group multiple root nodes --> <inner-element></inner-element> <inner-other-element></inner-other-element> </ng-container> <some-element *ngSwitchDefault>...</some-element> </container-element>

Class Overview

class NgSwitch {
ngSwitch 

}

Selectors

[ngSwitch]

Class Description

Class Details

exported from common/index, defined in common/src/directives/ng_switch.ts