feat(forms): added support for arrays of controls

This commit is contained in:
vsavkin
2015-03-25 10:51:05 -07:00
parent 0ae33b7e3c
commit ff84506bd5
5 changed files with 297 additions and 47 deletions

View File

@ -60,5 +60,18 @@ export function main() {
expect(g.controls["login"].validator).toBe(Validators.nullValidator);
expect(g.validator).toBe(Validators.group);
});
it("should create control arrays", () => {
var c = b.control("three");
var a = b.array([
"one",
["two", Validators.required],
c,
b.array(['four'])
]);
expect(a.value).toEqual(['one', 'two', 'three', ['four']]);
});
});
}
}