Send AJAX through your adapter without building the URL
ember install ember-data-application-adapter-service
Convert
actions: {
send() {
let adapter = this.store.adapterFor('application');
let host = adapter.get('host');
let namespace = adapter.get('namespace');
adapter.ajax(`${host}/${namespace}/my-url`);
}
}
into
adapter: Ember.inject.service(),
actions: {
send() {
this.get('adapter').ajax('my-url');
}
}
git clone <repository-url>
cd ember-data-application-adapter-service
npm install
npm run lint:hbs
npm run lint:js
npm run lint:js -- --fix
-
ember test
– Runs the test suite on the current Ember version -
ember test --server
– Runs the test suite in "watch mode" -
ember try:each
– Runs the test suite against multiple Ember versions
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
This project is licensed under the MIT License.