Replace Engine.emit with router.emit