NgSwitch
directive
The [ngSwitch]
directive on a container specifies an expression to match against.
The expressions to match are provided by ngSwitchCase
directives on views within the container.
- Every view that matches is rendered.
- If there are no matches, a view with the
ngSwitchDefault
directive is rendered. - Elements within the
[NgSwitch]
statement but outside of anyNgSwitchCase
orngSwitchDefault
directive are preserved at the location.
API
Description
Usage Notes
class NgSwitch {}
ngSwitch
any
Jump to details