Under ExtJS 4 is there a way to load external components?

百般思念 提交于 2019-12-04 11:17:17

You can add this same loader into each of the applications app.js file.

Ext.Loader.setPath('Common', '../components/');

Then give your common components the same namespace when you define them and place them in the components top level folder.

componenta.js

Ext.define('Common.componenta', {
    extend: 'Ext.panel.Panel',
    title: 'Component A'
});

Then the Common namespace will be available for you to extend in each application

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