0

I can't find the error, the design redux works fine and update correctly the variable. console.log(this.count) works, but the subscribe doesn't update the view {{ count }}

Many thanks.

import { Store } from '@ngrx/store';
import * as fromContador from '../logic.actions';
import { AppState } from '../app.reducer';

export class InputsComponent {

      count: number;

      constructor(private store: Store<AppState>) {

            this.store.select('count').subscribe(function(contador){

                   this.count= count;
                   console.log("count:" +  this.count);

            });                      
      }
Gelso77
  • 1,763
  • 6
  • 30
  • 47

0 Answers0