-1
設置方法我有self.model.set('pristineMethod', utils.cloneDeep(self.model.get()));
角JS:在角JS
例如
var SearchModel = Backbone.Model.extend({
performSearch: function(str) {
//assign to local variable, so that it is accesible in callback's closure
var self = this;
$.get('/' + str, function(results) {
// are you sure it should be data?
console.log(data);
self.set("results", data);
});
},
});
我必須做在角JS對象這一概念。
需要更多的細節 - 不清除您的問題是什麼! –
@DuncanThacker我已經更新了描述 – Ruchi