title: Angular 7 mat-checkbox not being checked with reactive forms
body: <p>I am using Angular7 mat-checkbox with reactive forms. Below is the code.</p>
  
  <pre><code>shared: FormGroup;
   constructor(private router: Router, fb: FormBuilder,private filterServices:FilterServices) {
          this.shared = fb.group({
              "byAll": false,
              "byFriends": false,
              "byPeers": false,
              "byExperts": false,
              "bySpecificFriends": false,
              "byNone":false,
              "permissionType":"share",
              "emails": []
          });
  }
  </code></pre>
  
  <p>On nginit function i am getting data from db as shown below</p>
  
  <pre><code>  ngOnInit(){
         this.filterServices.getFilters(12).subscribe((res)=&gt;{
          console.log(res);
          this.setFormvalues(res);
         }) 
      }
  setFormvalues(response:any){
       response.forEach(element =&gt; {
  
               this.sharedEmails = [];
               this.sharedEmails = element['emails'].split(',');
               this.shared.value['byAll'] = element["byAll"]
               this.shared.value['byExperts'] = element['byExperts']
               this.shared.value['byFriends'] = element['byFriends']
               this.shared.value['byNone'] = element['byNone']
               this.shared.value['byPeers'] = element['byPeers']
               this.shared.value['bySpecificFriends'] = element['bySpecificFriends']
               console.log(this.shared)
         })
  }  
  </code></pre>
  
  <p>I am able to set the data to the properties in shared object, but checkboxes in html is not getting checked. Suppose shared['byAll'] was initially false (checkbox initially unchecked),but after getting data fro service calls now its value is true. But in html its not getting reflected i mean checkbox is not getting checked. Am i going wrong somewhere?? </p>
  
  <p>below is the html code.</p>
  
  <pre><code>&lt;form [formGroup]="shared"&gt;
                          &lt;div fxLayout="row" fxLayoutGap="20px"&gt;
                              &lt;mat-checkbox formControlName="byAll"&gt;All&lt;/mat-checkbox&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>