title: How to bind hard coded value to datsource of MatTableDataSource?
body: <p>I am using reactive model.and angular material.
  I want to display mat table of student. I am binding values hardcoded to table.but its not working .</p>
  
  <p>i tried example of angular material exactly.</p>
  
  <p>user.html</p>
  
  <pre><code>&lt;table mat-table [dataSource]="dataSource" class="mat-elevation-z8"&gt;
  
      &lt;ng-container matColumnDef="sno"&gt;
        &lt;th mat-header-cell *matHeaderCellDef&gt; No. &lt;/th&gt;
        &lt;td mat-cell *matCellDef="let element"&gt; {{element.sno}} &lt;/td&gt;
      &lt;/ng-container&gt;
  
      &lt;ng-container matColumnDef="sname"&gt;
        &lt;th mat-header-cell *matHeaderCellDef&gt; Student Name &lt;/th&gt;
        &lt;td mat-cell *matCellDef="let element"&gt; {{element.sname}} &lt;/td&gt;
      &lt;/ng-container&gt;
  
      &lt;ng-container matColumnDef="age"&gt;
        &lt;th mat-header-cell *matHeaderCellDef&gt; Age &lt;/th&gt;
        &lt;td mat-cell *matCellDef="let element"&gt; {{element.age}} &lt;/td&gt;
      &lt;/ng-container&gt;
  
      &lt;tr mat-header-row *matHeaderRowDef="displayedColumns"&gt;&lt;/tr&gt;
      &lt;tr mat-row *matRowDef="let row; columns: displayedColumns;"&gt;&lt;/tr&gt;
    &lt;/table&gt;
  </code></pre>
  
  <p>user.ts</p>
  
  <pre><code>export class ListComponent implements OnInit {
    displayedColumns: string[] = ['sno', 'sname', 'age'];
  
    dataSource : MatTableDataSource&lt;Student&gt;;
  
    ngOnInit() {
      this.getStudList();
    }
  
    getStudList(){
      const ELEMENT_DATA: Student[] = [
        {sno: 1, sname: 'durga', age: 26},
        {sno: 2, sname: 'gauri', age: 25},
        {sno: 3, sname: 'laxmi', age: 24},
      ];
      this.dataSource = new MatTableDataSource(ELEMENT_DATA);
    }
  }
  </code></pre>
  
  <p>It is giving me dataSource isn't property of mat-table.</p>