reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

How can I change url in runtime? #284

Closed tybulewicz closed 4 years ago

tybulewicz commented 4 years ago

Hi,

Our code is being used on different environments, and based on current domain we want to change API url that is being accessed.

Is there a way I can change value that was passed into NgxJsonapiModule.forRoot() as url at runtime?

Thanks

tybulewicz commented 4 years ago

Sorry, it's not you, it's me.

I had AOT enabled and that compiled out accessor that was expected to execute at runtime setting url parameter.

When AOT and buildOptimizer were disabled everything is working as expected.