I would like to inject some information on the navbar (parent component) using Vue Portal.
So in a component, I can do:
<portal to="navbar">
<b-button>Some option</b-button>
</portal>
Thus, in the Navbar component I have:
<portal-target name="navbar"></portal-target>
But I would like to add a separator in this navbar if and only if the portal is enabled:
<b-nav-text v-if="$portal.navbar.enabled">|</b-nav-text>
<portal-target name="navbar"></portal-target>
Obviously the $portal
prototype is not available... What's the alternative?
This can be done by CSS easily.