1.0.0 • Published 8 years ago

ember-config-service v1.0.0

Weekly downloads
12,286
License
MIT
Repository
github
Last release
8 years ago

ember-config-service

Easily get values from your app's config/environment.js with a service.

Build Status Ember Observer Score Greenkeeper badge npm version npm

Usage

Install this addon by running the following with Ember CLI.

ember install ember-config-service

The config service is now available for you to use in your app. For example, if you added the following to your config/environment.js:

ENV.api = {
  host: 'http://mydomain.com',
  namespace: 'myapi'
};

You could define your application adapter with the following:

import Ember from 'ember';
import DS from 'ember-data';

export default DS.JSONAPIAdapter.extend({
  config: Ember.inject.service(),

  host: Ember.computed.alias('config.api.host'),
  namespace: Ember.computed.alias('config.api.namespace')
});

Contributing

Pull requests and issues are welcome!

Installation

  • git clone this repository
  • npm install
  • bower install

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

1.0.0

8 years ago

0.2.0

8 years ago

0.1.7

8 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago