title: How to add a checkbox in a Material Design table in Angular 4
body: <p>I would like to add a checkbox in a Material Design table in Angular 4, it would be under the column Publish. The problem is that the checkbox doesn't show in the table just the text with and error message </p>
  
  <p>"No value accessor for form control with unspecified name attribute" 
  <a href="https://i.stack.imgur.com/BiCwd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BiCwd.png" alt=""></a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;div class="mat-table-container mat-elevation-z8"&gt;
    &lt;mat-table #table [dataSource]="assessmentManualList"&gt;
  
      &lt;ng-container cdkColumnDef="documentID"&gt;
        &lt;mat-header-cell *cdkHeaderCellDef&gt;  &lt;/mat-header-cell&gt;
        &lt;mat-cell *cdkCellDef="let row"&gt;
          &lt;button mat-icon-button [matMenuTriggerFor]="menu"&gt;
            &lt;mat-icon&gt;more_vert&lt;/mat-icon&gt;
          &lt;/button&gt;
          &lt;mat-menu #menu="matMenu"&gt;
            &lt;button mat-menu-item&gt;
              &lt;mat-icon&gt;&lt;i class="material-icons"&gt;content_copy&lt;/i&gt;&lt;/mat-icon&gt;
              &lt;span&gt;Copy {{row.DocumentID}}&lt;/span&gt;
            &lt;/button&gt;
            &lt;button mat-menu-item&gt;
              &lt;mat-icon&gt;&lt;i class="fa fa-trash" aria-hidden="true"&gt;&lt;/i&gt;&lt;/mat-icon&gt;
              &lt;span&gt;Delete {{row.documentID}}&lt;/span&gt;
            &lt;/button&gt;
          &lt;/mat-menu&gt;
        &lt;/mat-cell&gt;
      &lt;/ng-container&gt;  
  
      &lt;ng-container cdkColumnDef="textDetail"&gt;
        &lt;mat-header-cell *cdkHeaderCellDef&gt; Document &lt;/mat-header-cell&gt;
        &lt;mat-cell *cdkCellDef="let row"&gt; {{row.textDetail}} &lt;/mat-cell&gt;
      &lt;/ng-container&gt; 
  
      &lt;ng-container cdkColumnDef="isPublish"&gt;
        &lt;mat-header-cell *cdkHeaderCellDef&gt; Publish &lt;/mat-header-cell&gt;
        &lt;mat-cell *cdkCellDef="let row"&gt;
          {{row.isPublish}}
          &lt;md-checkbox class="example-margin" [(ngModel)]="row.isPublish"&gt; 
  Checked &lt;/md-checkbox&gt;  
        &lt;/mat-cell&gt;            
      &lt;/ng-container&gt; 
      &lt;mat-header-row *cdkHeaderRowDef="displayedColumns"&gt;&lt;/mat-header-row&gt;
      &lt;mat-row *cdkRowDef="let row; columns: displayedColumns;" (click)="selectedRow(row)" [class.active]="isSelected(row)"&gt;&lt;/mat-row&gt;
    &lt;/mat-table&gt;
  &lt;/div&gt;
  </code></pre>