简体   繁体   中英

Cancel Ember Data call

As known in ember when queryrecord.find("modelName") is released a call is made. is there any way to cancel that call like we cancel an ajax call ? ( xhr.abort() )

Short answer is no.

Long answer is Ember Data specifically hides its XHR object which makes it hard to cancel. You can work on exposing it in several ways, but the consensus I've seen in discussions on this is it may not be a good tradeoff (as you're leaking an implementation detail out of Ember Data that may change in the future)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM