| | |
| | | } |
| | | ); |
| | | } |
| | | public static getValueFormControl(controlSet: FormGroup, name: string) { |
| | | return controlSet.controls[name].value; |
| | | } |
| | | public static setValueToControl(controlSet: FormGroup, name: string, value: any) { |
| | | controlSet.controls[name].setValue(value); |
| | | controlSet.controls[name].updateValueAndValidity(); |
| | | } |
| | | public static removePrivate(obj: object) { |
| | | Object.keys(obj).forEach( |
| | | (key: string) => { |
| | |
| | | if (num) { result = num + result; } |
| | | return result; |
| | | } |
| | | public static getObjById<T>(id: number, list: T[]): T { |
| | | return list.find(item => item['id'] === id); |
| | | } |
| | | } |