@aricallen wrote:
Hi folks. I'm currently deploying an Ember app via a Heroku-like service and have everything up and running if I hard code the JSONAPIAdapter's 'host' param but not I'm trying to make this more configurable... I'm wondering if anyone has come across a way to set this param via the result of a promise. The situation is that I would like to make a GET request to web service 'A', which will give me a value to set to 'host' that will allow the app to talk to service 'B'. My attempts up to this point have all turned up futile. I've tried computed props, services, etc. but I keep getting the same error:
http://localhost:4200/[object%20Object]/entity
Which I'm guessing is that it's attempting to set the 'host' with Promise.toString() because the route doesn't know the value of host is async.
A little more perspective: I'm hoping to be able to change which backend I'm talking to via the values stored in a db which is returned via web service 'A'. Basically I'm trying to replace inaccessible environment variables.
All ideas are welcome. Many thanks in advance! Any thoughts?
Posts: 1
Participants: 1