ngSwitch (directive in module ng )

Description

Conditionally change the DOM structure.

Usage

as element (see IE restrictions)
<ng-switch
       on="{*}">
</ng-switch>
as attribute
<ANY ng-switch="{*}">
   ...
</ANY>

Directive info

  • This directive creates new scope.

Parameters

Example

Source







Demo