Skip to content

Instantly share code, notes, and snippets.

@saimon24
Created July 15, 2016 16:02
Show Gist options
  • Save saimon24/5815e54f15d77e4007ac6d98973fb613 to your computer and use it in GitHub Desktop.
Save saimon24/5815e54f15d77e4007ac6d98973fb613 to your computer and use it in GitHub Desktop.
<ActionBar title="My Pokedex"></ActionBar>
<GridLayout>
<Image src="http://pokeapi.co/media/sprites/pokemon/150.png" [class.hide]="!isLoading"></Image>
<ListView [items]="pokemon" [class.visible]="listLoaded" class="small-spacing" (itemTap)="showDetails($event)">
<template let-item="item" let-x="index">
<DockLayout stretchLastChild="true">
<Image
dock="left"
[src]="'http://pokeapi.co/media/sprites/pokemon/' + (x+1) + '.png'"
width="45"></Image>
<Label [text]="x+1 + '. ' + item.name" class="medium-spacing"></Label>
</DockLayout>
</template>
</ListView>
<ActivityIndicator [busy]="isLoading" [visibility]="isLoading ? 'visible' : 'collapse'" row="1" horizontalAlignment="center"
verticalAlignment="center"></ActivityIndicator>
</GridLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment