How do you include a UX class in the MVC pattern?

前端 未结 5 1251
陌清茗
陌清茗 2020-12-30 09:01

Before the MVC pattern I would include UX classes simply by including this at the top of the JS, before Ext.onReady:

Ext.Loader.setConfig({enabl         


        
5条回答
  •  臣服心动
    2020-12-30 09:10

    Ok I found it from this post.

    Just need to use Ext.Loader.setPath call at the top of the app controller, e.g.:

    Ext.Loader.setPath('Ext.ux', 'extjs/examples/ux');
    Ext.application({
        name: 'ST',
        autoCreateViewport: true,
        ...
    

    Or wherever you want to put the ux classes, for condensing purposes, the app specific UX classes should be pulled out and stuck in your own folder something like app/ux as the post covers.

提交回复
热议问题