I don’t know whether I am missing something but injecting the constructor of a custom baserequestoptions class was working fine for me in Beta 17 but after moving to RC1 this approach doesn’t seem to work any more.
I have created a plunkr to illustrate that the webapibaseurl now comes through as undefined (the same code approach but with Beta 17 references worked):
https://embed.plnkr.co/usOljRDLap9RlLd3RIBd/
Any ideas?
Extending from
RequestOptions
instead of fromBaseRequestOptions
made it work for meotherwise for some unknown reason injecting
@Inject('webApiBaseUrl') private webApiBaseUrl:string
didn't work.Plunker example
This still works for me. Here is the custom option class I used:
and I register it this way:
See this plunkr: https://plnkr.co/edit/MK30JR2qK8aJIGwNqMZ5?p=preview.
Edit
It seems that there is a problem at the level of dependency injection for such class. I opened an issue: https://github.com/angular/angular/issues/8925.