lundi 28 septembre 2015

Loading a single record with Ember 2.0 and Ember Data 2.0

G'day all,

I've come unstuck when trying to fetch a single record using Ember Data 2.

The server is designed to respond to a GET request like this:

GET http://server/api/results/1

with this as a result:

{
   "results" : [
     {
        "id": 1,
        "catname": "Category 1",
     }
   ]
}

The Ember route code looks like this:

export default Ember.Route.extend({
   model: function() {
        return this.store.find('game',12);
   }
});

The problem is that there doesn't appear to be a network request going out (a previous findAll fetch has worked, so I don't think it's the adapter), and there is an error I have not been able to find informaiton on:

Uncaught TypeError: Cannot set property'crossDomain' of undefined

Does anyone have any idea what this could be, of hint at how I might track this down?

Thanks,

Andy




Aucun commentaire:

Enregistrer un commentaire