title: Precheck box in Angular Material Tree
body: <p>I have an Angular Material Tree I'm displaying. The tree works fine by itself, but I also have a list of names/ids that are already selected values. The data is given to me separately. I haven't been able to figure out how to precheck boxes inside the tree on load. </p>
  
  <p>I've created a Stackblitz here to show my issue: <a href="https://stackblitz.com/edit/angular-ukaq9u" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ukaq9u</a></p>
  
  <p>My initial thought was to try and look through my selected list and manually toggle the selected in ngInit like so (this doesn't work though):</p>
  
  <pre><code>    for (const pg of selectedBoxes) {
        let leaf = new TodoItemFlatNode();
        leaf.item = pg.Product_Group_ID.toString();
        leaf.level = 1;
        leaf.expandable = false;
        this.todoLeafItemSelectionToggle(leaf);
      }
  </code></pre>
  
  <p>Does anyone have any other suggestions? I haven't been able to find any examples online.</p>