Created
April 10, 2019 17:25
-
-
Save splincode/d57ddad57d8868f8abf0b38fa2835eaf 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
@Component({ | |
selector: 'my-app', | |
template: ` | |
<b>default</b>: {{ todos$ | async | json }} <br> | |
<b>mutable reverse</b>: {{ mutableTodos$ | async | json }} <br> | |
<b>immutable reverse</b>: {{ immutableTodos$ | async | json }} <br> | |
` | |
}) | |
export class AppComponent { | |
@Select(AppState) | |
public todos$: Observable<number[]>; | |
@Select(AppState.mutableTodos) | |
public mutableTodos$: Observable<number[]>; | |
@Select(AppState.immutableTodos) | |
public immutableTodos$: Observable<number[]>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment