0👍
data
is meant for internal component data modeling, while props, which can be assigned externally, are defined using the props
key for your component.
In other words, try:
var app = new Vue({
...,
props: {
incidents: {
type: Array,
required: false //change this as you see fit.
}
},
...
});
For full documentation on component properties, please refer to the official guide.
0👍
EDIT: Didn’t read the code very well for the first time. Verify that you have data inside the response and if not don’t set it the incidents array.
Source:stackexchange.com