Skip to main content
edited body
Source Link
yglodt
  • 14.4k
  • 15
  • 98
  • 135

You need to trigger change detection tp-detection to update the sheet:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    this.yourService.getData().subscribe(data => {
        // do your stuff and notify of changes like this
        this.changeDetectorRef.detectChanges();
    });
}

You need to trigger change detection tp update the sheet:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    this.yourService.getData().subscribe(data => {
        // do your stuff and notify of changes like this
        this.changeDetectorRef.detectChanges();
    });
}

You need to trigger change-detection to update the sheet:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    this.yourService.getData().subscribe(data => {
        // do your stuff and notify of changes like this
        this.changeDetectorRef.detectChanges();
    });
}
added 84 characters in body
Source Link
yglodt
  • 14.4k
  • 15
  • 98
  • 135

You need to trigger change detection tp update the sheet:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    this.yourService.getData().subscribe(data => {
        // do your async stuff and callnotify thisof after:changes like this
        this.changeDetectorRef.detectChanges();
    });
}

You need to trigger change detection:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    // do your async stuff and call this after:
    this.changeDetectorRef.detectChanges();
}

You need to trigger change detection tp update the sheet:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    this.yourService.getData().subscribe(data => {
        // do your stuff and notify of changes like this
        this.changeDetectorRef.detectChanges();
    });
}
Source Link
yglodt
  • 14.4k
  • 15
  • 98
  • 135

You need to trigger change detection:

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';

constructor(private changeDetectorRef: ChangeDetectorRef) { }

ngOnInit() {
    // do your async stuff and call this after:
    this.changeDetectorRef.detectChanges();
}