I am working with a vue
component called <PlanView/>
. In my code, I am rendering this component conditionally:
<div v-if="show_plan" id="mainplan">
<PlanView/>
</div>
<div class="icon" v-else>
<font-awesome-icon icon="fa-solid fa-angles-right" @click="openPlan"/>
</div>
openPlan() {
this.show_plan = true;
},
However, I want the functionality to be triggered even when the component is not rendered. Can you please provide guidance on how I can achieve that? Thank you in advance.