Answer the question
In order to leave comments, you need to log in
How to force compiled Angular2 project to take settings from json file?
Hey!
There is a project on Angelar2. The settings are placed in a separate JSON file. When compiling (ng build), the content is pushed into a bundle (main.bundle.js).
Question - can I somehow do it so that JSON is not stuffed into the bundle, and the application takes the settings from the JSON file during operation?
Answer the question
In order to leave comments, you need to log in
in the first angular there was a $http.json method. in the second it also seems to be there: this.http.get('app/heroes.json')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question