Hi I have a base Model -
var BaseModel = Backbone.Model.extend({
initialize : function(input){
// Some base initialization implementation common for all Concrete Models
},
ajaxCall : function(input){
var dfd = new jQuery.Deferred();
$.ajax({
type: 'Get',
url: input.url,
success:function(data){
// Some on success implementation
dfd.resolve(data);
},
error:function(){
dfd.reject();
}
});
return dfd.promise();
}
});
Now, I want to create a ConcreteModel that extends the BaseModel's fetch function and just overrides the ajax success
var ConcreteModel = BaseModel.extend({
ajaxCall : function(input){
BaseModel.prototype.ajaxCall.call(this, input);
// How to override just the ajax success implementation
}
});
How do I just override the ajax success implementation in the ajaxCall function of ConcreteModel.
Thanks.