NgSwitchDefault

Stable

Directive

What it does

Creates a view that is added to the parent NgSwitch when no case expressions match the switch expression.

How to use

  1. <container-element [ngSwitch]="switch_expression">
  2. <some-element *ngSwitchCase="match_expression_1">...</some-element>
  3. <some-other-element *ngSwitchDefault>...</some-other-element>
  4. </container-element>

Class Overview

class NgSwitchDefault {
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch)

}

Selectors

[ngSwitchDefault]

Class Description

Constructor

constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch)

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