正如标题所言,我无法解答。 我用茉莉花来尝试确保它被定义, 它不识别文件。 这是代码( 在网络上修补它) :
Notes.controller = (function ($, dataContext) {
var notesListSelector = "#notes-list-content";
var noNotesCachedMsg = "<div>No notes cached</div>";
var notesListPageId = "notes-list-page";
var currentNote = null;
function init() {
dataContext.init();
var d = $(document);
d.bind("pagechange", onPageChange);
}
function onPageChange(event, data) {
var toPageId = data.toPage.attr("id");
switch (toPageId) {
case notesListPageId:
renderNotesList();
break;
}
}
function renderNotesList() {
var notesList = dataContext.getNotesList();
var view = $(notesListSelector);
view.empty();
if (notesList.length === 0) {
$(noNotesCachedMsg).appendTo(view);
} else {
var notesCount = notesList.length;
var note;
var ul = $("<ul id="notes-list" data-role = "listview"></ul>".appendTo(view);
for (var i =0; i<notesCount; i++) {
note = notesList[i];
$("<li>" + "<a data-url ="index.html#note-editor-page?noteId=" + note.id +
"" href="index.html#note-editor-page?noteId=" +note.id + "">" + "<div>" +
note.title + "</div>" + "<div class="list-item-narrative">" + note.narrative
+ "</div>" + "</a>" + "</li>").appendTo(ul);
}
ul.listview();
}
};
return {
init: init
}
})(jQuery,Notes.dataContext);
我甚至尝试用开发者提供的源代码来取代所有这一切, 并且它仍然没有定义, 所以这会不会是一个软件配置问题?
谢谢 谢谢