jquery - Backbone : access model's data from collection's remove method -
i looking way remove 1 of model's data sets using collection's remove method. doesn't seem work in way. there way remove data in model collection's method?
here code.
helloworldmodel.set({things: value}); helloworldcollection.add([ {things: helloworldmodel.get("things")} ]); helloworldcollection.remove(?????????);
thanks
you need reference object add collection remove it; following possible solution. though create actual model containing slimmed down version of other model:
helloworldmodel.set({things: value}); obj = {things: helloworldmodel.get("things")} helloworldcollection.add(obj); helloworldcollection.remove(obj);
Comments
Post a Comment