How can we use rails routes with angularjs in a DRY way?

后端 未结 3 1782
余生分开走
余生分开走 2021-02-10 16:28

First of all,I would say sorry for my broken English and the broken codes...(many words here come from google translation...so, I\'m afraid that I can\'t make myself clear...so,

3条回答
  •  清歌不尽
    2021-02-10 16:52

    I try to avoid complex services like: '/parents/:parent_id/children/:id'
    I separate this in two services:
    /parents/:parent_id/children. For GET(list) and the POST(Id in Content) And then I have /children/id for the PUT,DELETE and single GET

提交回复
热议问题