Get Current Route Name in api.onPageChange Event

api.onPageChange((url, title) =>{
  const router = api.container.lookup('service:router');
  console.log(router.currentRoute.name);
}
2 Likes