Route param dont work

when I use the ‘/ home / 38’ route it works perfect, but the second time, the parameter continues 38 even though I pass ‘/ home / 23’

Not getting the full picture, can you please share your actual route?

{
path: ‘/home/:vendor_id?’,
url: ‘./index.html’,
name: ‘home’,
on: {
pageAfterIn: function (event, page) {
console.log(‘Page After in home’);
app.infiniteScroll.create(’.infinite-scroll-content’);
},
pageInit: function (event, page) {
console.log(‘Page init home’);
console.log(page.route.params.vendor_id);

    },
    pageAfterOut: function () {
      app.infiniteScroll.destroy('.infinite-scroll-content');
    }
}

}

i use this app.router.navigate(’/home/’ + vendor_id + ‘/’);