Question 9
Consider the following HTML, with the correct Vue 2 CDN links included.
<div id="app"> <p>Original Order: {{ customerOrder }}</p> <p>Updated Order: {{ updatedOrder }}</p> <server-component :order="customerOrder"@order-updated="updateOrder"></server-component> </div>
<script> Vue.component('server-component', { props: ['order'], template: ` <div> <button @click="modifyOrder">Send Updated Order</button> </div> `, methods: { modifyOrder() { this.$emit('order-updated', this.order + ' - Extra mayo'); } } });
new Vue({ el: '#app', data() { return { customerOrder: 'Burger', updatedOrder: '' }; }, methods: { updateOrder(newOrder) { this.updatedOrder = newOrder; } } }); </script>What will be displayed in the <p> tags after the button on the server-component is clicked?