【文件属性】:
文件名称:dom-binder:DOM 绑定器
文件大小:5KB
文件格式:ZIP
更新时间:2021-07-02 22:07:26
JavaScript
dom-binder
DOM 绑定器
安装
$ component install alexeyraspopov/dom-binder
$ bower install dom-binder
应用程序接口
bind(node, attr, observer)
observer应该提供方法subscribe ,它传递一个函数并立即用最新的值调用它。
用法
bind(inputElement, 'value', new PathObserver(model, 'user.name'));
绑定
在某些情况下,值可以转换并写成元素的属性:
属性
捆绑
价值
字符串值)
检查
布尔值(值)
内部HTML
字符串值)
文本内容
字符串值)
选择索引
数量(值)
否则 - 按属性绑定。
执照
(c) Alexey Raspopov
【文件预览】:
dom-binder-master
----index.js(1KB)
----package.json(683B)
----readme.md(816B)
----spec.js(107B)
----gulpfile.js(859B)
----component.json(188B)
----.gitignore(12B)
----karma.conf.js(2KB)
----.jshintrc(320B)
----bower.json(237B)
----.editorconfig(189B)
----.gitattributes(13B)
----binder.js(823B)