0👍
You should add to your data
(or props
) property posts
because posts
doesn’t exist in scope of vue component:
export default {
data(){
posts: [],
}
}
And later in the methods of code you can set posts
array like this:
this.posts = response.data;
- [Vuejs]-Vee-validate 3 and Bootstrap 3 form error styling
- [Vuejs]-State variable returning an error when WATCH on IE browser
Source:stackexchange.com