watch-dom:DOM 的 Angular $watch

时间:2021-07-05 09:08:18
【文件属性】:
文件名称:watch-dom:DOM 的 Angular $watch
文件大小:10KB
文件格式:ZIP
更新时间:2021-07-05 09:08:18
CoffeeScript 看守所 什么? 有效地观察 dom 元素(或其后代)的变化。 为什么? angular $watch观察$scope上的属性修改,因为在 angular 中$scope是事实的来源。 对于大多数用例来说,这是一个很好的模式。 但是,在某些情况下,您希望模块解耦,而 dom 是事实的基本来源。 如何? 默认配置 watchDom . $watch ( DOMElement , function ( newValue , oldValue ) { ... } ) ; 观看自定义属性( ) var props = { subtree : true , attributeFilter : [ 'foo' , 'bar' ] } ; watchDom . $watch ( DOMElement , function ( newValue , oldValue ) { ...
【文件预览】:
watch-dom-master
----.gitignore(98B)
----package.json(992B)
----src()
--------watch-dom.js(818B)
----LICENSE.md(11KB)
----.travis.yml(197B)
----dist()
--------watch-dom.js(899B)
----README.md(2KB)
----Gruntfile.coffee(2KB)
----bower.json(610B)
----test()
--------test.coffee(2KB)

网友评论