ember-config-helper
v1.0.0
Published
convenience helper to read your application config from within a template, so you can easily use it in template only components.
Readme
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 v5.12 or above
- Embroider or ember-auto-import v2
Installation
ember install ember-config-helperUsage
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"}}Usage in .gjs/.gts
import { config } from 'ember-config-helper';
<template>
{{config "defaults.username"}}
</template>Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.
