Access config from main.js
phinett opened this issue · 1 comments
phinett commented
What is the best way to access my configuration settings from main.js?
Vheissu commented
Hi. As per the README, there is an example of Aurelia i8n using the configuration plugin (which I have pasted below for you):
import {AureliaConfiguration} from "aurelia-configuration";
// [...]
aurelia.use
.standardConfiguration()
.plugin('aurelia-i18n', (instance) => {
let configInstance = aurelia.container.get(AureliaConfiguration);
let apiEndpoint = configInstance.get('api.endpoint');