DS.RESTAdapter#namespace

namespace{String}

Defined in addon/adapters/rest.js:349

Endpoint paths can be prefixed with a namespace by setting the namespace property on the adapter:

app/adapters/application.js
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
  namespace: 'api/1'
});

Requests for the Post model would now target /api/1/post/.

doc_EmberJs
2016-11-30 16:50:32
Comments
Leave a Comment

Please login to continue.