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 @@ + + + + + DEMO - test + + + + + + + + \ No newline at end of file diff --git a/demo.html b/demo.html index 50c3f01..144166c 100644 --- a/demo.html +++ b/demo.html @@ -8,6 +8,7 @@ font-weight: bold; } + @@ -18,7 +19,7 @@

- +

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, {