I have dynamic routes in my router where I load different content depending on the id params, the problem is that as I visit pages without refreshing the page the memory usage starts to increase with every new page with different params and any event I want to fire fires as much as the pages I visited earlier, how can I completely get rid of the pages visited before which still lives in the background.
import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import SomePage from '@/views/SomePage.vue';
{
path: '/some/:id',
name: 'Some',
meta:{title:'Some Title',description:'Some Description'},
component: SomePage
},