[Vuejs]-Accessing data in vue component

2👍

Pass the prop to the component like :order="order". Inside the component vm, list this in props array as a String.

export default {
  name: 'component-vallingby',
  props: ['offer']
}

Then instantiate your component passing order like this:

<component-vallingby :offer="offer"></component-vallingby>

1👍

You need props inside of your export default {} mentioned.

props: ['offer']

You should bind it as

<component-vallingby :offer="offer"></component-vallingby>

Leave a comment