ExtJS application not looking in the correct app folder

主宰稳场 提交于 2019-12-07 01:38:28

You have to set the appFolder ex:

Ext.application({
    name: 'AM',
    appFolder: "Physical path of appfolder",
    autoCreateViewport: true, 
    controllers: [
        'Users'
    ]
});

Create the object for above class. You will get the correct path for controllers

this is how to commonly configure the path mapping:

Ext.Loader.setConfig({
    enabled: true,
    paths: {
        'AM': 'app'
    }
});

I never found out why it wasn't working for me, but to continue with the tutorial, I just used Ext.application instead and assigned the application to a global var in launch, i.e.:

Ext.application({
    requires: ['Ext.container.Viewport'],
    name: 'AM',
    controllers: [
        'Smiles'
    ],
    autoCreateViewport: false,

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