Comparing version 0.2.0 to 0.2.1
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "gedi.js", | ||
@@ -11,0 +11,0 @@ "dependencies": { |
@@ -176,2 +176,14 @@ Gedi | ||
#### Binding to Paths with wildcards #### | ||
You can bind to paths containing wildcards to watch for changes to properties on items in an array: | ||
model.bind('[thing/*/stuff/*/a]', function(event){ | ||
alert(event.getValue()); | ||
}); | ||
gedi.set('[thing/1/stuff/1/a]', 1); // will alert 2 | ||
gedi.set('[thing/2/stuff/2/b]', 2); // not trigger the callback, because the triggered path does not match the bound path | ||
### Binding to an Expression ### | ||
@@ -192,11 +204,2 @@ | ||
You can bind to paths containing wildcards to watch for changes to properties on items in an array: | ||
model.bind('[thing/*/stuff/*/a]', function(event){ | ||
alert(event.getValue()); | ||
}); | ||
gedi.set('[thing/1/stuff/1/a]', 1); // will alert 2 | ||
gedi.set('[thing/2/stuff/2/b]', 2); // not trigger the callback, because the triggered path does not match the bound path | ||
Expressions with wildcards are not supported, as there is no logical way to handle an expression containing more than one wildcarded path. | ||
@@ -203,0 +206,0 @@ |
74033
222