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
ngSwitchDefaultdirective is rendered. - Elements within the
[NgSwitch]statement but outside of anyNgSwitchCaseorngSwitchDefaultdirective are preserved at the location.
API
Description
Usage Notes
class NgSwitch {}
Jump to details