我試圖破壞或設置或其他功能使用,但我的錯誤是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(),' –