- Timestamp:
- 07/29/20 13:21:48 (5 years ago)
- Branches:
- master
- Children:
- de18858
- Parents:
- ef1219a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/counter/counter.component.ts
ref1219a re42f61a 5 5 import { MatPaginator } from '@angular/material/paginator'; 6 6 import { MatSort } from '@angular/material/sort'; 7 import { HealthcareWorkers } from '../models/HealthcareWorkers'; 7 8 8 9 @Component({ … … 13 14 export class CounterComponent implements OnInit { 14 15 public facilities: HealthFacilities[]; 16 public workers: HealthcareWorkers[]; 15 17 displayedColumns = ['Име','Општина','Адреса', 'Тип', 'Е-пошта', 'Телефон']; 18 displayedColumnsWorkers = ['Име','Гранка','Установа', 'Назив']; 16 19 dataSource = new MatTableDataSource<HealthFacilities>(); 20 dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>(); 17 21 18 22 @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator; … … 25 29 this.dataSource = new MatTableDataSource<HealthFacilities>(this.facilities); 26 30 }, error => console.error(error)); 31 http.get<HealthcareWorkers[]>(baseUrl + 'HealthcareWorker/Get?').subscribe(result => { 32 this.workers = result; 33 console.log(this.workers); 34 this.dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>(this.workers); 35 }, error => console.error(error)); 27 36 } 28 37 ngOnInit(): void { … … 32 41 this.dataSource.paginator = this.paginator; 33 42 this.dataSource.sort = this.sort; 43 this.dataSourceWorkers.paginator = this.paginator; 44 this.dataSourceWorkers.sort = this.sort; 34 45 } 35 46 … … 38 49 filterValue = filterValue.toLowerCase(); 39 50 this.dataSource.filter = filterValue; 51 this.dataSourceWorkers.filter = filterValue; 40 52 } 41 53 }
Note:
See TracChangeset
for help on using the changeset viewer.