Last active
March 3, 2019 20:30
-
-
Save brandonroberts/17ee8dbdf8a2ae11cd0e5b74c5a3be0e 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: 'app-movies-page', | |
template: ` | |
<h1>Movies Page</h1> | |
<div *ngIf="error$ | async as errorMessage"> | |
{{ errorMessage }} | |
</div> | |
` | |
}) | |
export class MoviesPageComponent implements OnInit { | |
error$ = this.store.select(fromRoot.selectMoviesPageError); | |
constructor(private store: Store<fromRoot.State>) {} | |
ngOnInit() { | |
this.store.dispatch('[Movies Page] Load Movies'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment