[Vuejs]-Passing params NativeScript-Vue

1👍

really late but might help others if the other two answers wouldn’t work:

export default {
  props: ['name'],
  data() {
    name: this.name
  }
  mounted(){
    console.log(this.name)
  }
}
👤Ada

0👍

I think you should try like this

export default {
  props: ['name'],
  mounted(){
    console.log(this.props.name)
  }
}

if this not work, then please share a playground sample, where I can check the issue

0👍

On your destination page try defining the props like this:

props: {
        name: {
            type: String,
            default: ''
        }
    }

Works for me.

Leave a comment