https://github.com/ytiurin/bindbind.js
https://github.com/ytiurin/bindbind.js
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ytiurin/bindbind.js
- Owner: ytiurin
- License: mit
- Created: 2015-03-23T08:32:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-01T07:07:16.000Z (almost 10 years ago)
- Last Synced: 2025-05-08T22:54:18.711Z (about 1 month ago)
- Language: JavaScript
- Size: 395 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bindbind.js
========Data binding made simple.
##Usage
Declare binding anchors inside your HTML code
```html```
Define view model and bind it to the DOM
```javascript
var myViewModel = {writers:[]};
var _o = new bindbind(myViewModel);
// _o <- this is an observing proxy object,
// it holds setters and getters of your
// object properties and notifies other
// objects about it's changes
```Update view model using observing proxy
```javascript
_o(myViewModel.writers).push({
name:'Joseph Conrad',
uri:'https://en.wikipedia.org/wiki/Joseph_Conrad'});_o(myViewModel.writers).push({
name:'James Joyce',
uri:'https://en.wikipedia.org/wiki/James_Joyce'});
```Resulting HTML
```html
```
##Note
This is still in beta.