I
I
Ivan Stroykin2016-11-18 22:48:04
Angular
Ivan Stroykin, 2016-11-18 22:48:04

How to properly organize the pickup of the config from the backend at the beginning of the download?

Good day,
There is a configuration file in the .json format on the backend, which is used everywhere in the project (back, api, current front). Now I am transferring a project from angular 1.5 to angular 2 and the question arose, how would it be most correct to organize a request to this file at the very beginning of the download? So that under certain configurations in a file, different actions are performed after a full load?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Zuev, 2016-11-19
@StivinKing

For such things usually use APP_INITIALIZER
How to load data from the server before the application is loaded?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question