Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <template>
  2. <div class="container">
  3. <div v-for="pensee in pensees">
  4. <h4>{{ pensee.user.name }}</h4>
  5. <p>{{ pensee.text }}</p>
  6. <p>{{ pensee.created_at }}</p>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. resource: null,
  13. data () {
  14. return {
  15. pensees: {},
  16. user: {},
  17. }
  18. },
  19. mounted () {
  20. this.resource = this.$resource('/pensees{/id}')
  21. this.resource.get().then((response) => {
  22. this.pensees = response.body[0];
  23. this.user = response.body[1];
  24. })
  25. }
  26. }
  27. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement