Skip to content

ember addon that provides a convenience helper to access your application config from within the template.

License

Notifications You must be signed in to change notification settings

nvdk/ember-config-helper

Repository files navigation

ember-config-helper

Gaining access to an app's config file from a template only route or component can be annoying. This addon provides a convenience helper to read the config from within the template.

Compatibility

  • Ember.js v3.24 or above
  • Ember CLI v3.24 or above
  • Node.js v12 or above

Installation

ember install ember-config-helper

Usage

Let's say your environment.js file looks like this:

module.exports = function (environment) {
  let ENV = {
    defaults: {
      username: "John Doe"
    }};

  return ENV;
};

This helper allows you to access that information as follows in your hbs file

{{config "defaults.username"}}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

ember addon that provides a convenience helper to access your application config from within the template.

Resources

License

Stars

Watchers

Forks

Packages