wonder whether Ember Data can deal with cross domain successfully? If yes, how? If no, does it mean I have to fetch data by $.getJson and process the data by myself. thanks :)
In addition, the backend part is based on Ruby on Rails
Sure, Ember Data works cross-domain no problem; you’re just bound by the cross-domain security policies of the browser.
The two options for doing cross-domain communication are:
- JSONP (javascript - What is JSONP, and why was it created? - Stack Overflow)
- Enabling CORS headers (Cross-Origin Resource Sharing (CORS) - HTTP | MDN)
Because Ember Data is designed to work with any mechanism you might use for data loading, both of these are implicitly supported.
thanks a lot Tom : ) I'll try it out as u told me. btw, I watched 2013 nds, the cage match, emberjs vs angularjs, that's really coooooooool~