3👍
✅
You can pass the popSlug
value as a prop to the component as explained in the documentation here. Then in the pop-modal
component, you can access the value as this.popSlug
and the watch will react to changes. Just make sure to don’t modify the prop value inside the component, because it is supposed to be a read-only value.
Here is a working example. The internalValue
is only used to show that the watch is being called. You can use anyname
directly in the template.
Source:stackexchange.com