ngAfterChanges method

  1. @override
void ngAfterChanges()

Implementation

@override
void ngAfterChanges() {
  if (_factoryChanged || _typeChanged) {
    _disposeChildComponent();
    if (_viewContainerRef != null) {
      _initialize();
    } else {
      _loadDeferred = true;
    }
  } else if (_valueChanged) {
    // Only update the child if the component was not changed. If the
    // component was changed then it will get initialized with the value.
    _updateChildComponent();
  }
  _valueChanged = _factoryChanged = _typeChanged = false;
}