vm.$get( expression )
-
Arguments:
{String} expression
-
Usage:
Retrieve a value from the Vue instance given an expression. Expressions that throw errors will be suppressed and return
undefined
. -
Example:
123456789var
vm =
new
Vue({
data: {
a: {
b: 1
}
}
})
vm.$get(
'a.b'
)
// -> 1
vm.$get(
'a.b + 1'
)
// -> 2
Please login to continue.