Skip to content

Instantly share code, notes, and snippets.

@philipszdavido
Created September 17, 2017 16:10
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/757788b16b7c7916ad9cbfe4c77f6a08 to your computer and use it in GitHub Desktop.
Save philipszdavido/757788b16b7c7916ad9cbfe4c77f6a08 to your computer and use it in GitHub Desktop.
//src/app/app.component.ts
import { Component } from '@angular/core';
import { Store } from '@ngrx/store'
import * as fromArticle from './redux/reducer'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
constructor(private store: Store<fromArticle.State>){
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