Created
September 17, 2017 16:10
-
-
Save philipszdavido/757788b16b7c7916ad9cbfe4c77f6a08 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
//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