Remote configurations for Angular9+ applications, with built-in interceptor for mock REST data and non-permanent api
Installation
npm i --save ngx-remote-config
Links
Demo - Demo application with ngx-remote-config.
Stackblitz - Simply sample of usage on https://stackblitz.com
Demo settings - Settings for demo application stored on https://testapi.io
Demo Ionic - Example usage in ionic application with native HTTP module
path-to-regexp - Library usage for match url on interceptor
Usage
app.module.ts
;; @ {}
app.component.html
...Load with directive {{config|json}}Load with service {{serviceConfig|json}}...
app.component.ts
;;...serviceConfig$: Observable<any>; { thisserviceConfig$ = this_ngxRemoteConfigServiceconfig$;}...
settings.json (https://testapi.io/api/EndyKaufman/ngx-remote-config.json)
"options": "name":"Remote name" "description":"Remote description" "/api/resource/2": "get": "status": 404 "body": "message": "Fake not found message" "/api/resource": "get": "name": "get:item1" "name": "get:item2" "name": "get:item3" "/api/(.*)": "https://todo-nestjs.rucken.io/api/"
License
MIT