Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.caregiverService.getCaregiver(this.id)
- .subscribe(data => {
- console.log(data)
- this.caregiver = data;
- for(var i = 0; i < this.caregiver.patients.length; i++){
- this.cgs.push(this.caregiver.patients[i]);
- }
- }, error => console.log(error));
- <div *ngIf="cgs">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Name</th>
- <th>Address</th>
- <th>Birthdate</th>
- <th>Gender</th>
- <th>User type</th>
- </tr>
- </thead>
- <tbody>
- <ng-container *ngFor="let caregiverr of cgs">
- <tr *ngIf = "caregiver.usertype=='Caregiver'">
- <td>{{caregiverr.name}}</td>
- <td>{{caregiverr.address}}</td>
- <td>{{caregiverr.birthdate}}</td>
- <td>{{caregiverr.gender}}</td>
- <td>{{caregiverr.usertype}}</td>
- </tr>
- </ng-container>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement