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
1
2
3
4
5
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.