Linked Questions

Popular Questions

I am having an issue because I have a component that is used as a child component in two places, and I want to create a back button that sends the user back to the correct route. I can do it with the individual parents:

<button open ref="backBtn" :back="`/parent1/${this.$}/home`" />
<button open ref="backBtn" :back="`/parent2/${this.$}/home`" />

But what I really want is a single button with a method that says: Okay, you came from parent 1? Then use :back="/parent1/${this.$}/home" else, use :back="/parent2/${this.$}/home"

Can it be done?

Related Questions