Commit 630e6884 authored by Thodoris Nestoridis's avatar Thodoris Nestoridis

ui paginator

parent 03fa2c1c
import { Component, OnInit, AfterViewInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { Boilerplate } from 'src/app/models/boilerplate.model';
import { BoilerplateData } from 'src/app/models/boilerplate.model';
import { InferenceResults } from 'src/app/models/boilerplate.model';
......@@ -6,6 +6,7 @@ import { BoilerplateService } from 'src/app/services/boilerplate.service';
import { PrefixService } from 'src/app/services/prefix.service';
import { ActivatedRoute, Router } from '@angular/router';
import {MatTableDataSource} from '@angular/material/table';
import {MatPaginator} from '@angular/material/paginator';
......@@ -35,6 +36,9 @@ export class BoilerplateListComponent implements OnInit {
newdataSource = new MatTableDataSource(this.thenewdataSource);
infer:InferenceResults[] = [{}];
@ViewChild(MatPaginator) paginator= this.newdataSource.paginator;
dataofboilerplates: any [] = [];
aprefix: any [] = [];
main: any;
......@@ -70,6 +74,7 @@ export class BoilerplateListComponent implements OnInit {
this.boilerplatesdata =data;
this.thenewdataSource = data;
this.newdataSource = new MatTableDataSource(this.thenewdataSource);
this.newdataSource.paginator = this.paginator;
console.log(data)
},
error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment