JavaScript file for REST URLs
It would be nice to have a "global" JavaScript file where the URLs of the rest services are defined. At the moment, in every js file are all rest URLs defined...
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
It would be nice to have a "global" JavaScript file where the URLs of the rest services are defined. At the moment, in every js file are all rest URLs defined...
You can use Setting service to define such things. Settings service is pretty much works like a property file:
Then use it in the service for URL or request parameters:
{url}
How can you make a service URL come from local storage variable?
In the service, define the URL to be {url}. Then, create a request parameter called 'url'.
When you do mapping for this parameter, in JavaScript run this:
localStorage.getItem('url');