propsData
1.0.22+
-
Type:
Object
-
Restriction: only respected in instance creation via
new
. -
Details:
Pass props to an instance during its creation. This is primarily intended to make unit testing easier.
-
Example:
12345678910var
Comp = Vue.extend({
props: [
'msg'
],
template:
'<div>{{ msg }}</div>'
})
var
vm =
new
Comp({
propsData: {
msg:
'hello'
}
})
Please login to continue.