简体   繁体   中英

How to get a nested routeName in the Parents route or controller in Ember JS

I have a nested route and I want to do something on that route. To do that I need to determine when I am on that route.

I'd like to do this from the Parents route or controller. I have tried using

routeName
fullRouteName

in the Parent route but these only return the Parents route name.

Is there a way to get a Child routes name in the Parent route?

我不确定为什么需要动态检索子路由,因为您始终可以查看router.js来查看总是要进行硬编码的所有子路由,但是,您可以考虑使用child属性在RouteInfo对象上

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM