A
A
Andrey Prozorov2018-02-01 17:42:28
Angular
Andrey Prozorov, 2018-02-01 17:42:28

What is a good practice for getting translations in Angular?

There are several components (about 10 -15 ) in which I get the words from the localization and pass them to the scope on the view. In each such place, I do translation.get which, in my opinion, creates an ajax http request to a json file. Is it good? or can get the entire translation in the top component and store it in its entirety? on the one hand, most of all it is necessary to store in memory. on the other hand more http requests.
Here is a piece of code on how I do it:
5a73274f45952520629673.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question