Why should I use Ext.dispatch rather than calling controller code directly?

ⅰ亾dé卋堺 提交于 2019-12-04 02:40:28

The beforedispatch event is handy in case you need to redirect them to another controller.

Using dispatch also lets me load the controller code as needed instead of all at once on page load. I cut my app's startup time in half that way.

You said your app didn't need it, but being able to set the historyUrl and directly link to pages would be the main benefit for other users I think.

So I guess it all depends on the app whether it makes sense to use it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!