Angular5 model update, view not refreshed?

model is an Array, an event needs to delete an element. Through .splice (index, 1), the element is deleted, but the view is not updated;


you can try to manually remind angular to re-render the view

import { NgZone } from '@angular/core';

  constructor(public _ngZone:NgZone) {}

  public refresh() {
    this._ngZone.run(() => {});
  }

are you a dynamic form? the controls of the form has not been deleted

Menu