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

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

Class Overview

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

Selectors

[ngSwitchCase]

Class Description

Insert the sub-tree when the expression evaluates to the same value as the enclosing switch expression.

If multiple match expressions match the switch expression value, all of them are displayed.

See NgSwitch for more details and example.

Constructor

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

Class Details

ngSwitchCase

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

doc_Angular
2016-10-06 09:46:46
Comments
Leave a Comment

Please login to continue.