6
在RC1中,我怎样才能获得全局的currentstatename或当前路由名称?Emberjs - 如何访问RC1中的当前状态或路由名称?
更具体的替代语法: App.get('router')。currentState.name;
在RC1中,我怎样才能获得全局的currentstatename或当前路由名称?Emberjs - 如何访问RC1中的当前状态或路由名称?
更具体的替代语法: App.get('router')。currentState.name;
看一看在这个问题的答案:Ember App.Router.router.currentState undefined
简短的回答:目前的状态是在名为“currentPath”的ApplicationController的商店。
这是我的答案类比问题: http://stackoverflow.com/a/31994957/4205051 – DenQ 2015-08-13 17:44:20