Select All option for selecting all the values in md-option with in md-select. I am populating md-option by using ngFor and i am using formControl. I can see the checkboxes for all the md-option values. But I am not able to check all the checkboxes from typescript(.ts) file. How do put select all option? I am trying control.setValue(arrayvalues); But it doesn't check the checkboxes.
标签:
angular4-forms
相关问题
- Correct way to integrate reCAPTCHA with Angular 4
- angular 4- How do I send file in POST to backend
- Angular binding object with array from component t
- Angular: Error to POST HTML form (Not ajax) via co
- Angular 2/4 : Reactive forms are synchronous while
相关文章
- How to set ngIf dynamic condition in dynamic form
- Charts in Angular 2+
- Angular dynamic form nested fields
- Property 'controls' does not exist on type
- 基于在角2 JSON响应切换按钮(Toggle button based on json respo
- 设置值不小于0 FormArray活性形式(Set Value Not Less Than 0 In
- how to implement confirm on exit in angular 4?
- How to capture bind event of select element using
I wrote [compareWith] = compareById(obj1, obj2) attribute for md-select in my HTML page and in the .ts file write the below method {
compareById(obj1, obj2){ return obj1 = obj2.code}
}. It works for me.