this does not work if you are using an arrow function for assigning your data: data: () => ({ somevar: this.messageId // undefined }), Because this will not point to the component. Instead, use a plain function data: function() { return { somevar: this.messageId } }, or ES6: data() { return { somevar: this.messageId } }