-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic domain #23
Comments
Hi Vinnchan,you could do it like this,
in a file then import it in the file where you are calling it,like:
|
Sorry, I think my last question was ambiguous. I get my domain url from an rest API beforehand. This domain url change according to what user type in. The $config.domain below is actually an url value I get from rest API and I assign it to config.domain. Below example is an interpolation: ${config.domain}/wp-json/ export function WpApiLoaderFactory(http: Http, config:Config) { The demo only demonstrate assign one domain, I want to know how to assign domain according what domain url value user provide us from a form. Thank you |
Interesting question. I am not sure how to do this for now with AoT support. Might be worth looking at libraries such as angularfire2 to see if they support dynamic config. |
any update on this? i need that dynamic change too... |
Not possible with the current code. PR welcome |
any update on this? i need that dynamic change too... |
Hello, how to dynamically change the domain ?
For example:
export function WpApiLoaderFactory(http: Http, config:Config) {
return new WpApiStaticLoader(http,
${config.domain}/wp-json/
, /* namespace is optional, default: '/wp/v2' */);}
Thank you.
The text was updated successfully, but these errors were encountered: