2015-02-18 09:53:27 -08:00

26 lines
457 B
JavaScript

import {StringMapWrapper, StringMap} from 'angular2/src/facade/collection';
export class Control {
value:any;
constructor(value:any) {
this.value = value;
}
}
export class ControlGroup {
controls: StringMap;
constructor(controls:StringMap) {
this.controls = controls;
}
get value() {
var res = {};
StringMapWrapper.forEach(this.controls, (control, name) => {
res[name] = control.value;
});
return res;
}
}