我想配置一個使用ember-data連接並從一個api讀取數據的應用程序應用程序。 我的模式是:如何從Api讀取不同的root_node
App.Movie = DS.Model.extend
title: DS.attr 'string'
rating_average: DS.attr 'string'
short_plot: DS.attr 'string'
free: DS.attr 'boolean'
我的API收益:
{
"pagination": {
"count":xx,
"page": x,
"total_pages": x
},
"movies": [
{
"id": xxxx,
"title": "xxx",
"rating_average": "x",
"short_plot": "xxxx",
"already_seen": x,
....
....
當燼嘗試LO加載數據,它拋出:
Assertion failed: Your server returned a hash with the key **pagination** but you have no mapping for it
灰燼並不指望在了 「分頁」 鍵JSON。我如何指定只嘗試從關鍵'電影'中讀取?