Skip to content

Instantly share code, notes, and snippets.

@philipszdavido
Created September 18, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipszdavido/2a23febff0f6663d6f392741e530b719 to your computer and use it in GitHub Desktop.
Save philipszdavido/2a23febff0f6663d6f392741e530b719 to your computer and use it in GitHub Desktop.
//src/app/app.component.ts
constructor(private store: Store<fromArticle.State>){
this.store.dispatch(new fromAction.AddArticleAction({id:1,link:'http:angular.io',title:'Angular',points:0}))
this.store.select(fromArticle.getArticles).subscribe(v => {
console.log(v)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment