Created
February 23, 2016 18:56
-
-
Save mhartington/02abcfd3f30d6eef9737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Page} from 'ionic-framework/ionic'; | |
@Page({ | |
template: ` | |
<ion-navbar *navbar> | |
<ion-title> | |
Home | |
</ion-title> | |
</ion-navbar> | |
<ion-content class="home"> | |
<ion-list> | |
<ion-item-group *ngFor="#key of keys()"> | |
<ion-item-divider light> | |
{{key}} | |
</ion-item-divider> | |
<ion-item *ngFor="#obj of data[key]"> | |
<pre>{{obj.first_name }}</pre> | |
</ion-item> | |
</ion-item-group> | |
</ion-list> | |
</ion-content> | |
`, | |
}) | |
export class HomePage { | |
data = { | |
"A": [ | |
{ | |
"first_name": "Albert" | |
} | |
], | |
"B": [ | |
{ | |
"first_name": "Ben" | |
} | |
] | |
} | |
constructor() { } | |
keys() { | |
return Object.keys(this.data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment