title: Change colour for dynamic element on click
body: <p>How do you change [color] of a element when user clicks on it.
  Using Angular 12, and Angular Material.</p>
  <p>HTML</p>
  <pre><code>&lt;ng-container *ngFor=&quot;let item of itemList&quot;&gt;
     &lt;button mat-raised-button (click)=&quot;viewItem(item)&quot; [color]=&quot;'default'&quot;&gt;{{item.name}}&lt;/button&gt;
  &lt;/ng-container&gt;
  </code></pre>
  <p>TS</p>
  <pre><code>viewItem(item: any) {
      console.log(item.name + &quot; has been clicked&quot;);
  }
  </code></pre>
  <p>I want to change the button [color] to 'primary',
  There can be 1 or N number of items (dynamic list).</p>