Hello Folks,
I want to get the current route name in api.onpagechange event.
api.onPageChange((url, title) =>{
console.log("Current Route name")
});
In this above function, I want current route name. can we get this ?
Hello Folks,
I want to get the current route name in api.onpagechange event.
api.onPageChange((url, title) =>{
console.log("Current Route name")
});
In this above function, I want current route name. can we get this ?
api.onPageChange((url, title) =>{
const router = api.container.lookup('service:router');
console.log(router.currentRoute.name);
}
Thank you so much Richard… You save my day
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.