Im using Ember and Ember-Model to develop a front end which is calling a Spring/Rest/MongoDB back end, which is all running on my local machine for development purposes, but I get the same origin policy error for my call.
I want to know what the common work around for this is.
Here is my code:
App = Ember.Application.create();
App.Router.map(function(){
});
App.IndexRoute = Ember.Route.extend({
model: function(){
return App.User.find();
}
});
App.User = Ember.Model.extend({
lastName: Ember.attr()
});
App.User.adapter = Ember.Adapter.create({
findAll: function(klass, records) {
$.getJSONP("http://localhost:8080/users").then(function(data) {
records.load(klass, data.users);
});
}
})