問題: 我想從Sencha Touch 2.4.2遷移到EXT JS 6.0.2(現代)的應用程序。我目前正在與路線struggeling在我的控制器之一:從Sencha Touch遷移到EXT JS 6 - 默認/空Contoller路由
Ext.define('MyApp.controller.MyController', {
extend: 'Ext.app.Controller',
config: {
routes: {
'': 'doA',
':id': 'doB'
},
},
}
我要的是類似如下:
http://localhost/ --> doA()
http://localhost/#a --> doB()
doB()
總是完美的作品!但不知何故,第一路由沒有在EXT JS 6.0.2工作,但它在煎茶觸摸2.4.2沒有工作。我也試過以下,而不是'' : 'doA'
' ' : 'doA'
(空格)'*' : 'doA'
'#' : 'doA'
'/' : 'doA'
'.' : 'doA'
問題: 有誰知道如何獲得上面所需的行爲?
如果我錯過了任何需要的信息,只是讓我知道在評論!
任何幫助將不勝感激! 在此先感謝!
感謝您的答覆!我試了一下,並修改了我的路線'路線:{ '家': 'DOA', ':ID': 'DOB'}'。那會導致'HTTP調用://本地主機/#home'同時執行: doA()和doB() – Jan