我需要在我的sencha项目中使用路线。但我不明白为什么路线在最后工作,即使我写在其他之前。例如,路线最后工作
myFunction:function(){
console.info('hello ')
this.redirectTo('routingTest',true); //routes to hash 'routingTest'
console.info('world. ');
}
-----------
Output:
hello
world.
HI
但我想要的结果作为
hello
HI
world.
=============
这里是我的路线:
routes:{
'routingTest':{
action:'testing'
}
},
testing:function(){
console.log('HI')
}
任何方法来解决这个问题?在此先感谢
其实在路由功能,console.log('HI')我需要做更多的流量,它的console.log在这里。我想知道它的顺序。 –
您是否尝试过建议的更改?它有用吗? – mjs
是的,我尝试过但仍然一样。 –