我正在使用主干 JS,我在显示模型中的数据时遇到了麻烦。谁能知道这是如何工作的?TIA
VIEW.JS -
render: function() {
///EDITED TO SIMPLIFY
var toModel = new tModel();//tModel is the name of the model
console.log(toModel.get('data'));//?? UNDEFINE
}
模型.JS——
data:[
{ text: "Google", href: "http://google.com" },
{ text: "Facebook", href: "http://facebook.com" },
{ text: "Youtube", href: "http://youtube.com" }
],