You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionhandleResponse(response){varResource=DS.definitions.userSettings;vardata=Resource.deserialize(Resource,response);// Inject the data into the store and return itreturnResource.inject(data);};
Error: index.js:107 userSettings Error: userSettings.inject: "attrs" must contain the property specified by "idAttribute"! null
Work around: passing in id to inject
But Wondering how do I retrieve the id property so that I can inject it in the following way
Should I use computed attribute ?.
function handleResponse( response ) {
var Resource = DS.definitions.userSettings;
response = Resource.deserialize( Resource, response );
return Resource.inject(response,id);
};
How do I get the userId for the computed attribute?
Api Endpoint: : /test/users/:userId/settings
I need to use
Caching
withjs-data
actions
.The text was updated successfully, but these errors were encountered: