angularjs - The best way to set up app variables when the app is initializing -


Before I begin, I am using Net Back End.

To populate the page with the data I want from the server, send specific details of the app, such as APIs and points to the angular app, thres and point will be sent to the client side connular app.

I have an API and the API location can be changed from time to time, so I want to control it in back over. If these changes, then I do not want to change my front end code.

So before I can kill these APIs, I have to know the end point.

This is the best way to bootstrap my app before asking the API.

create an angular service endpoint such as having configuration items

During the service launch, the server must vote to get the endpoint (this call requires the "endpoint / api / end / api / endpoints" in the short span of the end point, unless you have a Are creating global).

You can then inject the service to any module; To get the end point


Comments