Closed a-radys closed 5 years ago
Hello, I would like to set the host API dynamically in AppModule according to window.location.origin like this:
AppModule
window.location.origin
imports: [ NgxJsonapiModule.forRoot({ url: window.location.origin + '/json/v1/', }) ]
but I can't do it because of AOT build. So my other idea would be to set the host API in specific service like mentioned in https://github.com/reyesoft/ngx-jsonapi/issues/35. Is it possible?
I managed to make it work just by setting:
imports: [ NgxJsonapiModule.forRoot({ url: '/json/v1/', }) ]
Hello, I would like to set the host API dynamically in
AppModule
according towindow.location.origin
like this:but I can't do it because of AOT build. So my other idea would be to set the host API in specific service like mentioned in https://github.com/reyesoft/ngx-jsonapi/issues/35. Is it possible?