title: Mat-Selection-List selectAll() not working
body: <p>I am trying to implement selectAll() and deselectAll() but it is showing error:
  <a href="https://i.stack.imgur.com/nyB0l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nyB0l.png" alt="enter image description here"></a></p>
  
  <p>I am using template-driven form. Here is my code:</p>
  
  <pre><code>&lt;mat-selection-list name="role" *ngIf='userActions === AssignmentTypesForProductivityAppsEnum.UserRole'
                      [(ngModel)]="assignProductivityApplication.roleIds" #UserRoles="ngModel" multiple required&gt;
                      &lt;mat-list-option #allSelected (click)="selectAll(allSelected.selected)" [value]="0"
                          checkboxPosition="before"&gt;All&lt;/mat-list-option&gt;
                      &lt;mat-list-option *ngFor="let role of userRoles | searchFilter : searchTerm : 'role'; let i=index"
                          checkboxPosition="before" [value]='role.guId'&gt;
                          {{role.role}}
                      &lt;/mat-list-option&gt;
                  &lt;/mat-selection-list&gt; 
  </code></pre>
  
  <p>And in ts file: </p>
  
  <pre><code>@ViewChild('allSelected', {static: true}) private allSelected: MatSelectionList; 
  selectAll(checkAll) {
          if (checkAll) {
              this.assignProductivityApplication.UserRoles = [];
              this.assignProductivityApplication.UserRoles.push(... this.userRoles.map(item =&gt; item.guId));
              this.allSelected.selectAll();
          }
        }
  </code></pre>