After incorporating a logger service into my project, I have encountered an issue with using it in NGXS static selectors. The selectors in NGXS are static methods, which prevent me from accessing the logger service injected via Angular DI.
Are there any elegant solutions to seamlessly utilize the service within the selectors?
constructor(
public logger: LoggerService
) {}
@Selector()
@ImmutableSelector()
public static get(state: StateModel) {
// <-- Log via LoggerService
return state.model;
}