A
A
Alexey2016-09-14 12:05:23
JavaScript
Alexey, 2016-09-14 12:05:23

How to implement loading .ini config before launching Angular application?

You need to create an .ini configuration file in the project, which will contain 2 settings (2 links).
When loading an application, it is necessary to unload information from this file and overwrite the corresponding links in app.constants.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Manakov, 2016-09-14
@gogolor

It can be something like this:

angular.element(document).ready(() => {
  fetch(sth)//Грузим то что надо из файлов
   .then(config => {
     //забиваем константы
    angular.bootstrap(document, ['app']);
   })
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question