briebug / ngrx-auto-entity

NgRx Auto-Entity: Simplifying Reactive State
https://briebug.gitbook.io/ngrx-auto-entity/
Other
66 stars 12 forks source link

AutoEntityService: Support supplying a function to host in config. #232

Open colesanders opened 1 year ago

colesanders commented 1 year ago

AutoEntityService

Feature Request:

When providing the host to the AutoEntityServiceModule config, currently only a string can be passed. Allowing a function to be provided would allow the host to be fetched dynamically at runtime instead of bootstrap. This would be helpful for hybrid apps and other use cases where the api endpoint might be dependent on the request or platform.

NgrxAutoEntityServiceModule.forRoot({
  host: ((entityInfo: IEntityInfo, operation: string, criteria: EntityCriteria) => string) | string;
})