Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/view
Higher level views built on reactive
https://github.com/component/view
Last synced: 13 days ago
JSON representation
Higher level views built on reactive
- Host: GitHub
- URL: https://github.com/component/view
- Owner: component
- Created: 2012-11-08T06:06:41.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-01T22:46:55.000Z (about 10 years ago)
- Last Synced: 2024-05-08T17:06:03.096Z (8 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 12
- Watchers: 9
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# View
Higher level views built on [reactive](https://github.com/component/reactive).
> __Note:__ This component is not compatible anymore with the latest reactive version.## Installation
$ component install component/view
## Demo Example
$ component build
$ open examples/todo.html## API
### View()
Initialize a view with the given `obj` / `el`.
function ItemView(item) {
View.call(this, item, tmpl.cloneNode(true));
}### View#bind(str:String, method:String)
Bind to an event with the given `str`, and invoke `method`:
this.bind('click .remove', 'remove')
this.bind('click .complete', 'complete')
this.bind('dblclick .info a', 'showDetails')### View#unbind([str]:String)
Unbind all listeners, all for a specific event, or
a specific combination of event / selector.
view.unbind()
view.unbind('click')
view.unbind('click .remove')
view.unbind('click .details')## License
MIT