angularjs-config
AngularJS configuration module for bringing server side configurations to AngularJS client application
Install
npm install angularjs-config
Usage
config.json
"jsonEndpoint": "angular-config" // endpoint for GET that returns only JSON "angularModuleEndpoint": "/angular-config.js" // edpoint suitable for use in HTML <script> tag "angularModuleName": "angularConfig" // name of the AngularJS module "angularModuleInjection": "Config" // name of AngularJS module injection "config": // JSON config to be exposed by AngularJS constant module "customSetting1": 1 "customSetting2": "foo" "customSetting3": "foo": "bar"
server.js
var angularConfig = ;var config = ; angularConfig;
index.html
<!-- page content -->
License
ISC © Nova Vizija d.d.