vue props for file code example
Example 1: vue js default prop
props: {
name: {
type: String,
default: 'John Doe'
}
}
Example 2: vuejs accessing props from data
data: function() {
var theData = {
somevar: this.messageId,
// other object attributes
}
return theData;
}