我试图破坏或设置或其他功能使用,但我的错误是this.model没有编辑的功能
Uncaught TypeError: this.model.destroy is not a function
看起来有对码
我的代码没有错误
define(['jquery',
'underscore',
'backbone',
'handlebars',
'/resources/app/models/TravelModel.js',
], function ($, _, Backbone, Handlebars, Travel) {
var addAdminPanelView = Backbone.View.extend({
el:$(".page"),
model:Travel,
events:{
'click #editButton':'editEvent',
},
deleteEvent:function(){
this.model.destroy(),
});
},
'$(本).model.destroy()'或'el.model.destroy(),' –
“遗漏的类型错误:无法读取属性 '破坏' 的未定义” @AlivetoDie – pinarkoroglu
'$(这个).model.remove(),''或'el.model.remove(),' –