'How to replace breadcrumb item with the dropdown item dynamically

HI I am trying to create a breadcrumb item using angular. right now it is like this: enter image description here

so I create a dropdown for the breadcrumb item, what I am struggling to do is:

when I click the item in the dropdown, it will exchange position with the breadcrumb item. In my example, if I click "Geysers del Tatio (Lujo)", it will replace "Geysers del Tatio (Standard)" in breadcrumb view, and "Geysers del Tatio (Standard)" will replace "Geysers del Tatio (Lujo)" in dropdown.

my code share here: https://stackblitz.com/edit/angular-ivy-fbgntk?file=src/app/app.component.html



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source