NgSwitchCase

Stable

Directive

What it does

Creates a view that will be added/removed from the parent NgSwitch when the given expression evaluate to respectively the same/different value as the switch expression.

How to use

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

Class Overview

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

}

Selectors

[ngSwitchCase]

Class Description

Constructor

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

Class Details

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