View container
Renders a container that can contain a single view. When navigation events occur, the container that has the identifier passed in the navigation options intercepts the event and displays the requested view.
Node name : view-container
Attribute
| Attribute | Type | Required | Default value | Description |
|---|---|---|---|---|
| container-id | string |
true |
Container identifier | |
| protect-unsaved-changes | boolean |
false |
false |
Ask for confirmation (the same Closing/HasChanges check a tab close already triggers) before replacing the displayed view, instead of silently discarding unsaved changes |
Example
<view-container container-id="Container1" />
<view-container container-id="MainView" protect-unsaved-changes="true" />
Warning
Directives can't be used on a view-container node because this component is only intended for abstraction and not for display.
Note
protect-unsaved-changes defaults to false so that every view-container already in use keeps its current "replace silently" behavior. Set it to true explicitly on any container that can display an editable view.