diff --git a/demo-test.html b/demo-test.html new file mode 100644 index 0000000..7a0f87a --- /dev/null +++ b/demo-test.html @@ -0,0 +1,27 @@ + + +
+ +- +
diff --git a/mvvm.js b/mvvm.js index ac899a2..724cd36 100644 --- a/mvvm.js +++ b/mvvm.js @@ -507,6 +507,9 @@ var MVVM = (function () { } MVVM.prototype = { + $watch: function(key, cb){ + new Watcher(this, key, cb); + }, _proxy: function (key) { var thiz = this; Object.defineProperty(thiz, key, {