Guest User

Untitled

a guest
Jun 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import { Component } from '@angular/core';
  2. import { PeopleService } from '../../providers/people-service/people-service';
  3. import { NavController } from 'ionic-angular';
  4.  
  5. @Component({
  6. templateUrl: 'build/pages/home/home.html',
  7. providers: [PeopleService]
  8. })
  9. export class HomePage {
  10. public people: any;
  11.  
  12. constructor(public peopleService:any) {
  13. this.loadPeople();
  14. }
  15.  
  16. loadPeople() {
  17. this.peopleService.load()
  18. .then(data => {
  19. this.people = data;
  20. });
  21. }
  22.  
  23.  
  24. onLink(url: string) {
  25. window.open(url);
  26. }
  27. }
  28.  
  29. <ion-navbar *navbar>
  30. <ion-title>
  31. Home
  32. </ion-title>
  33. </ion-navbar>
  34.  
  35. <ion-content class="home">
  36. <ion-list>
  37. <ion-item *ngFor="#person of people">
  38. <ion-avatar item-left>
  39. <img src="{{studentData.ProfileImageId}}">
  40. </ion-avatar>
  41. <h2>{{studentData.FirstName}} {{studentData.LastName}}</h2>
  42. <p>{{studentData.ContactEmail}}</p>
  43. </ion-item>
  44. </ion-list>
  45. </ion-content>
Add Comment
Please, Sign In to add comment