NgSwitchDefault

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

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

Class Overview

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

Selectors

[ngSwitchDefault]

Class Description

Insert the sub-tree when no case expressions evaluate to the same value as the enclosing switch expression.

See NgSwitch for more details and example.

Constructor

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

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

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/common/index/NgSwitchDefault-directive.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部