lundi 22 mai 2017

Ember Data: Loading comments for a post from separate endpoint

I have two endpoints of interest: /posts -> to get all the posts /posts/{post_id}/comments -> to get all the comments for a post

I would like to have a comments attribute on the post model, populated with comments from the comments endpoint. How can I load comments into the posts?

I am using DS.JSONSerializer.

Thanks!




Aucun commentaire:

Enregistrer un commentaire