これはばかげた質問かもしれませんが、ここに行きます。
私はsencha touch 2アプリでこのチュートリアルに従っています。私は Ext JS にとても慣れていないので、いつsquare brackets : [ .. ]
orを使うべきか理解できませんcurly brackets : { .. }
。
Ext.define("NotesApp.view.NotesListContainer", {
extend: "Ext.Container",
config: {
items: [{
xtype: "toolbar",
docked: "top",
title: "My Notes",
items: [{
xtype: "spacer"
}, {
xtype: "button",
text: "New",
ui: "action",
id:"new-note-btn"
}]
}]
}
});
そして、ここのように
html: [
'<img src="http://staging.sencha.com/img/sencha.png" />',
'<h1>Welcome to Sencha Touch</h1>',
"<p>You're creating the Getting Started app. This demonstrates how ",
"to use tabs, lists and forms to create a simple app</p>",
'<h2>Sencha Touch 2</h2>'
].join("")
sencha touch のコーディング中に中括弧と角括弧を適切に使用するのを手伝ってくれる人はいますか?
中括弧 { .. } をそのまま使用しないのはなぜですか? ext js が [ .. ] を { .. } と一緒に使用する必要があるのはなぜですか?