Answer the question
In order to leave comments, you need to log in
Why are items not loading in the store?
Hello! Such a problem. I use restadapter. API written in Laravel. So. I'm getting back an array of objects. The model has been created. There are items in the response in the console, but they are not loaded to the side. Why?
Laravel:
Route::get('jobs', ['middleware' => 'cors', function()
{
return \Response::json(\App\Job::all(), 200);
}]);
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
const { data } = payload;
if (data) {
arguments[2] = data;
}
let json = this._super(...arguments);
return json;
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question