refactor(forms): refactored forms to user Query to get html validators

This commit is contained in:
vsavkin
2015-06-17 14:45:40 -07:00
parent 85b8a15374
commit 4d1ed509e3
11 changed files with 104 additions and 37 deletions

View File

@ -184,6 +184,8 @@ class ListWrapper {
bool isListLikeIterable(obj) => obj is Iterable;
List<T> iterableToList(Iterable<T> ii) => ii.toList();
void iterateListLike(iter, fn(item)) {
assert(iter is Iterable);
for (var item in iter) {

View File

@ -253,7 +253,13 @@ export function iterateListLike(obj, fn: Function) {
}
}
}
export function iterableToList<T>(ii:Iterable<T>):List<T> {
var res = [];
for (var i of ii) {
res.push(i);
}
return res;
}
// Safari and Internet Explorer do not support the iterable parameter to the
// Set constructor. We work around that by manually adding the items.