Created
October 6, 2019 19:28
-
-
Save splincode/08bb74f51044c42e339e67c8494ecee8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@State<PreferencesStateModel>({ ... }) | |
export class PreferencesState { ... } | |
@State<string[]>({ ... }) | |
export class ZooState { | |
@Selector([PreferencesState]) | |
public static firstLocalPanda(state: string[], preferencesState: PreferencesStateModel) { | |
return state.find(val => val.indexOf('panda') > -1 && val.indexOf(preferencesState.location)); | |
} | |
@Selector([ZooState.firstLocalPanda]) | |
public static happyLocalPanda(state: string[], panda: string) { | |
return 'happy ' + panda; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment