compo-views
v0.10.48
Published
[](https://travis-ci.org/atmajs/compo-views) [](https://badge.fury.io/js/compo-views) [:Promise<Route>OpenViewfor the path, and hides current if any.
Signals
ViewManager Component emits signals to current View on various states.
viewActivity(type)Types:
startend
viewActivationviewDeactivation
Slots
viewNavigate(path:string)Signal alias fornavigatemethod.
Components
ViewManager defines some nested components. So you can override or extend each.
View
View template is placed inside the View component
Attributes
| Name | Type | Default | Description |
|------|------|---------|-------------|
|default |boolean |false | If no route is matched, this view will be shown to user |
|detach |boolean |true | After the view was hidden, detach the view from DOM. |
|recycle |boolean |false | Completely destroy the view on hide and re-render the next time it gets visible . |
Methods
hide:PromiseHides the view with
display:nonestyle.Note that it will be also detached from DOM
show:PromiseAttaches, if detached, and shows the view.
Both methods can be overridden to perform some animations or other behavior.
Progress
Progress component is always rendered. Current implementation shows the progress element when current View is loading.
Notification
Notification component is always rendered. Current implementation shows the notification messages, on errors etc.
Examples
# install atma toolkit
npm install atma -g
# run examples static server
npm run examples
# navigate `http://localhost:5777/examples/tabs/sync.html`
# and many more...Test
npm test:copyright: MIT - Atma.js Project

