0
即時獲取數據JSON API
格式與我Route
的Ember Data
和JSONAPIAdapter
- 這是工作的罰款無法顯示包含數據
// ok
/posts/1
this.store.findRecord('posts', params.post_id);
現在我嘗試使用ds-finder-include
加載包含數據,該數據越來越牽強,但在.hbs
https://www.emberjs.com/blog/2016/05/03/ember-data-2-5-released.html#toc_code-ds-finder-include-code
// not working
/posts/1/comments
this.store.findRecord('posts', params.post_id, { include: 'comments' });
沒有反映
hbs:
{{#each post.comments as |comment index|}}
comment: {{comment}}
{{/each}}