import { Component , OnInit } from '@angular/core' ; import { Store } from '@ngrx/store' ; import { AppState } from '../../reducers' ; import { Observable } from 'rxjs' ; import { getIsLoggedIn , getIsLoading } from '../../auth/store/auth.selectors' ; @ Component ( { selector : 'app-home' , templateUrl : './home.component.html' , styleUrls : [ './home.component.scss' ] } ) export class HomeComponent implements OnInit { isLoggedIn$ : Observable < boolean > ; isLoading$ : Observable < boolean > ; constructor ( private store ) { } ngOnInit ( ) { this . isLoggedIn$ = this . store . select ( getIsLoggedIn ) ; this . isLoading$ = this . store . select ( getIsLoading ) ; } }