Skip to content

Instantly share code, notes, and snippets.

@hibuno
Created January 27, 2018 02:52
Show Gist options
  • Save hibuno/417fa40ef46cdc2f8940e17abcd293b7 to your computer and use it in GitHub Desktop.
Save hibuno/417fa40ef46cdc2f8940e17abcd293b7 to your computer and use it in GitHub Desktop.
Add new page detail.vue
<template>
<div class="mt-5">
<div class="container">
<div class="row justify-content-md-center">
<div class="col-8">
<img :src="article.urlToImage" alt="Card image cap" class="img-fluid">
<p class="card-text"><small class="text-muted">{{ article.publishedAt }} - {{ article.author }} - {{ article.source.name }}</small></p>
<h5 class="card-title">{{ article.title }}</h5>
<p class="card-text">{{ article.description }}</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
computed: {
article () { return this.$store.state.article }
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment