Skip to content

Instantly share code, notes, and snippets.

@wharley
Created October 18, 2016 02:34
Show Gist options
  • Save wharley/f00333696c9058317565e76f27e920b2 to your computer and use it in GitHub Desktop.
Save wharley/f00333696c9058317565e76f27e920b2 to your computer and use it in GitHub Desktop.
<template>
<div id="app" class="container">
<table class="table table-bordered table-striped">
<tr v-for="issue in issues">
<td>{{issue}}</td>
</tr>
</table>
</div>
</template>
<script>
export default{
data() {
return {
issues: []
}
},
created: function() {
var url = "http://pokeapi.co/api/v2/";
this.$http.get(url).then(
(response)=>{this.$set(this, 'issues',response.data)}
)
}
}
</script>
<style>
body{
padding-top:30px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment