Utilizing Axios for retrieving a list of countries from a REST API, I have implemented modals with each displaying the name and flag of a country.
Upon clicking on any country name, the console will log the selected country.
I am looking to pass the last 5 clicked countries to a history modal.
<!-- History Modal -->
<div>
<b-button v-b-modal.modal-1>View History</b-button>
<b-modal id="modal-1" title="History">
<p class="my-4">{{ country.name }}</p>
</b-modal>
</div>
Below is the script for logging clicks:
handleClick(country) {
console.log("Clicked on: " + country.name);
},