Is it possible to call a method from outside the component to make the component reuseable?
Right now I add my button to open the modal in a template slot:
<
There is no (easy, supported) way to call a method in a component, but you can either modify a property in the child (eg. show
) (see Passing Data to Child Components with Props) or use events (see Custom Events, $emit and $refs). Using events you could also use an event bus. The event based solution is of course better suited to more complex interactions.