我在控制台中收到错误:Ext.application is not a function
. My index.html
文件包含以下代码:
...
<link rel="stylesheet" type="text/css" href="/ext-5.0.1/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css" />
<script src="/ext-5.0.1/ext-all-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
...
While app.js
只有这段代码,取自一个演示:
Ext.application({
name: 'AM',
appFolder: 'app',
launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [{
xtype: 'panel',
title: 'Users',
html : 'List of users will go here'
}]
});
}
});
EDIT
顺便说一句,甚至运行“官方”/ext-5.0.1/examples/app/simple/simple.html
我犯了同样的错误。这是为什么?
代替
<script src="/ext-5.0.1/ext-all-debug.js"></script>
你应该使用
<script src="/ext-5.0.1/build/ext-all-debug.js"></script>
第二个包含预期的所有组件和类。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)