Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
top-talent opened this issue May 17, 2019 · 1 comment
Open

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

top-talent opened this issue May 17, 2019 · 1 comment

Comments

@top-talent
Copy link

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.

@obuxim
Copy link

obuxim commented Aug 12, 2020

https://github.com/bradtraversy/larticles_vue_app/blob/master/resources/assets/js/components/Articles.vue

Check this, I think you're doing mistakes while following along. And please copy the contents inside <template></template put a <div></div> and paste your contents back inside the div. It will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants