Created
April 6, 2018 19:13
-
-
Save codediodeio/e31a9cef40e115a057332dd2b975e3df to your computer and use it in GitHub Desktop.
This file contains 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<AppStateModel>({ | |
name: 'app', | |
defaults: { | |
hello: '', | |
} | |
}) | |
export class AppState {} |
This file contains 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
export class SaladState extends AppState { | |
@Select() | |
static getSomething(state: any) { // <-- can I strong type state? | |
return state.salad.dressing; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment