Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kellyselden/ember-data-application-adapter-service
Send AJAX through your adapter without building the URL
https://github.com/kellyselden/ember-data-application-adapter-service
Last synced: 16 days ago
JSON representation
Send AJAX through your adapter without building the URL
- Host: GitHub
- URL: https://github.com/kellyselden/ember-data-application-adapter-service
- Owner: kellyselden
- License: mit
- Created: 2016-02-17T14:24:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-10T08:28:42.000Z (about 6 years ago)
- Last Synced: 2025-01-02T05:43:58.181Z (24 days ago)
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-data-application-adapter-service
==============================================================================[![Greenkeeper badge](https://badges.greenkeeper.io/kellyselden/ember-data-application-adapter-service.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/ember-data-application-adapter-service.svg)](https://badge.fury.io/js/ember-data-application-adapter-service)
[![Build Status](https://travis-ci.org/kellyselden/ember-data-application-adapter-service.svg?branch=master)](https://travis-ci.org/kellyselden/ember-data-application-adapter-service)
[![Ember Version](https://img.shields.io/badge/ember-2.16%2B-brightgreen.svg)](https://www.emberjs.com/)Send AJAX through your adapter without building the URL
Installation
------------------------------------------------------------------------------```
ember install ember-data-application-adapter-service
```Usage
------------------------------------------------------------------------------Convert
```js
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
```js
adapter: Ember.inject.service(),actions: {
send() {
this.get('adapter').ajax('my-url');
}
}
```Contributing
------------------------------------------------------------------------------### Installation
* `git clone `
* `cd ember-data-application-adapter-service`
* `npm install`### Linting
* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`### Running tests
* `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### Running the dummy application
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).