title: How to make default select the first item in mat-list in angular
body: <p>I wanna know how to make default select the first item of mat-list in angular. I tried but not able to resolve it. My mat-list code is here</p>
  <pre class="lang-js prettyprint-override"><code>export class StationsListComponent implements OnInit {
  
    @Input() stations: Stations[];
    selectedStation: Stations;
  
    constructor() { }
  
    ngOnInit(): void {
      this.selectedStation = this.stations[0];
    }
  }
  </code></pre>
  <pre class="lang-html prettyprint-override"><code>&lt;mat-list role=&quot;list&quot;&gt;
    &lt;div *ngFor=&quot;let book of Books&quot;&gt;
      &lt;mat-list-item id=&quot;{{book.bookId}}&quot; role=&quot;listitem&quot; class=&quot;list-item&quot; routerLink=&quot;/home/{{book.bookId}}&quot; [routerLinkActive]=&quot;['is-active']&quot;&gt;
        &lt;div class=&quot;station-div&quot;&gt;
            &lt;div class=&quot;station-name&quot;&gt;{{book.bookName}}&lt;/div&gt;
            &lt;div class=&quot;station-location&quot;&gt;{{book.authorName}}&lt;/div&gt;
        &lt;/div&gt;
      &lt;/mat-list-item&gt;
    &lt;/div&gt;
  &lt;/mat-list&gt;
  </code></pre>