Skip to content

fix a bug in the article.vue file. #2

@top-talent

Description

@top-talent

Hello,
I am a Chinese developer and going to learning the vue.js.
I saw your tutorial in youtube.
https://www.youtube.com/watch?v=DJ6PD_jBtU0
I create the aticles.vue and navbar.vue files.
Please see articles.vue file in below.

articles

{{ article.title }}

{{ article.body }}

<script> export default{ data(){ return{ articles: [], article: { id: '', title: '', body: '' }, article_id: '', pagination: {}, edit: false }; }, created() { this.fetchArticles(); }, methods: { fetchArticles(){ fetch('api/articles') .then(res => res.json()) .then(res => { this.articles = res.data; console.log(res.data); }) } } } </script>

I did running this code but there are bugs in this file..
http://prntscr.com/npqrpk
I am not sure about this bug.
Looking forward to hearing from you.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions