这是来自Rally SDK网站示例中生成的App-uncompressed.html文件:当我将此代码作为自定义HTMl应用程序复制并粘贴到Rally中时,它不会加载任何内容。我只是得到一个空白的应用程序。
<!DOCTYPE html>
<html>
<head>
<title>newTeam</title>
<script type="text/javascript" src="/apps/2.0rc/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function () {
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
//Write app code here
// The data store containing the list of states
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
//...
]
});
// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
renderTo: Ext.getBody()
});
}
});
Rally.launchApp('CustomApp', {
name:"newTeam",
parentRepos:""
});
});
</script>
<style type="text/css">
.app {
/* Add app styles here */
}
</style>
</head>
<body></body>
</html>
此外,我尝试在浏览器中运行调试文件,但出现Rally not defined
错误。
答案 0 :(得分:0)
未定义拉力赛,因为它应该是rc1
,而不是rc
,正如您的代码所示。
<script type="text/javascript" src="/apps/2.0rc1/sdk.js"></script>
您可以在浏览器中测试这些网址: