Add support for depthed resolution of data fields

This commit is contained in:
kpdecker
2014-02-09 18:35:22 -06:00
parent fcec69ae2c
commit 16f135835e
6 changed files with 39 additions and 24 deletions
+6
View File
@@ -77,6 +77,12 @@ export function template(templateSpec, env) {
}
return data;
},
data: function(data, depth) {
while (data && depth--) {
data = data._parent;
}
return data;
},
merge: function(param, common) {
var ret = param || common;