api.onPageChange 이벤트에서 현재 라우트 이름 가져오기

안녕하세요 여러분,

api.onpagechange 이벤트에서 현재 라우트 이름을 가져오고 싶습니다.

	api.onPageChange((url, title) =>{
     
    console.log("Current Route name")
  
  
	});

위 함수에서 현재 라우트 이름을 가져오고 싶은데, 이것이 가능한가요?

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

리처드, 정말 감사합니다.. 덕분에 하루를 구해줬어요 :star_struck: