title: mat paginator loading all data to first page in mat table ANGULAR
body: <p>I am loading JSON data from backend asp.net core c# API to ANGULAR material table but the problem is that the whole 100 JSON rows data load to the first page I have set up the paginator like below:</p>
  <pre><code>&lt;mat-paginator showFirstLastButtons [pageSizeOptions]=&quot;[25, 50, 100]&quot;&gt;&lt;/mat-paginator&gt;
  </code></pre>
  <p>as you can see paginator should load the first 25 rows but it loads all 100 rows on the first page. Below is the method through which I am calling my ASP.NET CORE C# web API to get JSON data to the mat table.</p>
  <pre><code>  @ViewChild(MatPaginator) paginator: MatPaginator;
    @ViewChild(MatSort) sort: MatSort;
      dataSource : MatTableDataSource&lt;BugsData&gt;;
        selection = new SelectionModel&lt;BugsData&gt;(true, []);
        bugsData:any;
          ngOnInit(){
          this.spinner.show();
          this.http.get('https://localhost:44318/api/Bugs/ListofBugs?projectid='+this.route.snapshot.params['id']+'').subscribe(
              (data:any) =&gt; {
                if(data.message!=null){
                  this.snackbar.open(data.message, '✖',{
                    duration:4000,
                    horizontalPosition:'center',
                    verticalPosition:'top'
                  }),
                  this.spinner.hide()
                }else{
                  console.log(data);
                  this.bugsData=data,
                  this.dataSource = new MatTableDataSource&lt;BugsData&gt;(this.bugsData),
                  this.dataSource.sort = this.sort,
                  this.dataSource.paginator = this.paginator,
                  this.spinner.hide()
                }
              }
            )
        
      
          }
          }
  </code></pre>
  <p>What is the problem with this code?</p>