Initial commit
This commit is contained in:
9
src/pages/grid/grid.html
Normal file
9
src/pages/grid/grid.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<ion-content no-padding>
|
||||
<ion-grid no-padding>
|
||||
<ion-row align-items-stretch>
|
||||
<ion-col col-4 *ngFor="let current of profiles" (tap)="profileTapped($event, current)">
|
||||
<img [src]="current.details.pic.thumb">
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-content>
|
||||
7
src/pages/grid/grid.scss
Normal file
7
src/pages/grid/grid.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
page-grid {
|
||||
|
||||
ion-col {
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
}
|
||||
27
src/pages/grid/grid.ts
Normal file
27
src/pages/grid/grid.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
|
||||
import { ProfileService } from '../../services/profiles';
|
||||
import { ProfilePage } from '../profile/profile';
|
||||
|
||||
@Component({
|
||||
selector: 'page-grid',
|
||||
templateUrl: 'grid.html',
|
||||
providers: [ ProfileService ]
|
||||
})
|
||||
export class GridPage {
|
||||
|
||||
profiles: any;
|
||||
|
||||
constructor(public navCtrl: NavController, public profileService: ProfileService) {
|
||||
profileService.load().then((data) => {
|
||||
this.profiles = data;
|
||||
});
|
||||
}
|
||||
|
||||
profileTapped(event, profile) {
|
||||
this.navCtrl.push(ProfilePage, {
|
||||
profile: profile
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user