Replies: 1 comment 3 replies
-
You don't add a new state but export function withPermissions(){
return signalStoreFeature(
type<{ state: { selectedFlightNo: number } }>(),
withMethods((permissionState) => (
handOverSearchFlight(selectedFlightNo: number) {
patchState(permissionState, {selectedFlightNo} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
To my understanding the
signalStore
provides functionallity to encapsulate specific domain handling - supported by thewith
-methods. But one downside (or plus - don't know) is that the variables are somehow encapsulated, meaning I cannot access from thesignalStoreFeature
to thesignalStore
. Is there a way to achieve it?I have currently defined a store like this
and the
withPermissions
feature likeMy idea is to forward the
selectedFlightNo
from the store to the encapsulatedsignalStoreFeature
. Right now the above code complains thatselectedFlightNo
is overridden which sounds somehow strange. Strange in sense of: I cannot access from the feature to the store - so how can they override?If I change
no further complaints. But nevertheless it won't solve the initial problem with handover.
Beta Was this translation helpful? Give feedback.
All reactions