我需要制作一个应用程序,其中有单独的模块,如用户、类别。我想为所有这些创建单独的 View ,然后最后想在主视图中调用。我是 Sencha 的新手。如何做到这一点?
Ext.application({
name: 'AM',
appFolder: 'app',
launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [
{
//need to replace this with app.views.userPage,how??????????
xtype: 'panel',
title: 'Users',
html : 'List of users will go here'
},
{
xtype: 'panel',
title: 'category',
html : 'List of category will go here'
}
]
});
}
});
最佳答案
在 github 上,Francis Shanahan 以 MVC 风格构建了一个简单的 sencha touch 2 应用程序,如果您可以了解他如何定义 View ,然后使用别名配置来定义自定义 xtypes,那么它应该可以回答您的问题。 https://github.com/FrancisShanahan/SenchaTouch2MVCHelloworld
关于javascript - 在 sencha 的主视图中包含多个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10695665/