Answer:
:title="msg.main?.articlename"
Explanation
- The
:
before the attribute tells Vue "there is some dynamic functionality in here, go and compute it" - The
?
is required because on first load themsg.main
will not be equal to anything, so it will be trying to read.articlename
ofundefined
. - There is no need for any
{}
, the:
tells Vue it's JavaScript.
Note: I've assumed here yu're sending msg.main
and not msg.payload
is is more common.