From within a controller function, how do you delete all the models in an Alloy Collection. The collection is using properties sync adapter. I think the backbone reset method is the way to go but I could not make it work.
How do you delete all models in an Alloy Collection
400 views Asked by Newport99 At
1
There are 1 answers
Related Questions in APPCELERATOR
- Appcelerator Platform support error in adhoc build of Titanium mobile
- How to connect Stripe terminal bluetooth reader to Android app using Appcelerator Titanium
- Incorrect Data Being Retrieved on ListView Click in Titanium
- Appcelerator Device Token converted to FCM token
- Appcelerator APP with add's, using AdMob or StartApp
- appcelerator ERROR | Bad response from login (incorrect user data), please try again
- Can't login with appc login
- Unable to start emulator in CMD first Appcelerator project
- Npm strange bug, Titanium Appc Alloy
- How to publish Appcelerator app to google playstore / Apple store?
- Appcelerator titanium alloy build error build fail CopySwiftLibs
- Does APNs provider API requirement starts March 31 notice applicable to Appcelerator Mobile Backend Services
- Titanium ios build error: The folder “Headers” doesn’t exist
- Appcelerator app, iOS reviewer rejected app build for issue not present in the Simulator
- Appcelerator Titanium iOS Background Service Stop 30 Seconds
Related Questions in BACKBONE.JS-COLLECTIONS
- I am trying to sort my collection when I add a new object to it, but it is not sorting and there are no errors
- How can I tell my javascript to wait until the server is done?
- How to properly reverse sort a BackboneJs collection?
- show local json data from collection in backbone.js
- Populating data from two different url in a backbone collection
- Why is my backbone.js collection not loading the correct list of data?
- backbone looses context on fetch
- var not defined - backbone.js
- Will backbonejs model cid be unique across multiple collection?
- backbone js getByCid not working
- backbone js: collection event function options index undefined
- Can backbone model is having attribute backbone model simple array
- Why is there multiple copies of the collection nested inside the models?
- How do you delete all models in an Alloy Collection
- "Undefined is not a function" error when calling a Backbone collection's fetch function
Related Questions in APPCELERATOR-ALLOY
- Incorrect Data Being Retrieved on ListView Click in Titanium
- Updating an application from titanium sdk 3.4.0.GA to 9.2.0.GA making my fonts looks very very small
- Simulator is not available appcelerator studio
- Where is the leak in HTTPClient
- Titanium Alloy ImageView from applicationDataDirectory
- Tabs content not visible
- Appcelerator Dynamic Config
- var win = Ti.UI.createWindow({theme: "Theme.MyThemeActionbar",}); not working in local file but working fine in tiapp.xml
- using axway appcelerator Webview how can I download a file to the device
- Appcelerator Alloy data binding - transfrom is called twice?
- Unable to call default Alloy libraries in Ti.Unit Framework
- How to add dotted line on a view on appcelerator titanium?
- Appcelerator Titanium - Using Model as dynamic theme
- Appcelerator change app color theme at runtime
- Update a web view by selecting a map annotation
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
The quickest way for me was to run
destroy()on every model. To do this quickly you can use underscore (build in) like this:or even extend the model.js
and run
Alloy.Collections.library.clear();Pro Tip: you can always search for things like
delete all models in backboneand use most of the results right away since it is using backbone in the background.