I\'m using a slot scope in vuejs. It\'s working great. I can pass anything I want into the slot like this:
Reading this article I have discovered that if you need to call a method programmatically (not from the template), you can actually pass a method from the parent component to the scoped-slot, but then you have to pass the same method to a child component through a prop: in this way you have access to the method, and can call it from the code.
This is how I used it:
In other parts of my code I used other elements inside the slot, but in each child component I could call this.myMethod()
.
I hope this helps other people :)