Tell ember.js to use different key for its model's “id”

后端 未结 2 740
醉酒成梦
醉酒成梦 2021-02-10 11:16

I am stuck in a situation where I shouldn\'t return id field in the API endpoint. I need to tell ember to use slug field for / instead of id

2条回答
  •  遇见更好的自我
    2021-02-10 11:51

    I'm not an ember pro, but I had wanted to use a slug instead of an ID recently and did this, wondering if this what you're after? https://stackoverflow.com/a/14967337/472852

提交回复
热议问题