hasContent property

bool get hasContent

Returns whether this has any projected nodes.

Implementation

bool get hasContent {
  final nodesToProject = _renderView.projectedNodes[_index];
  for (var i = 0; i < nodesToProject.length; i++) {
    final node = nodesToProject[i];
    // Check for views inserted dynamically by a directive (such as *ngIf or
    // *ngFor).
    if (node is ViewContainer) {
      final nestedViews = node.nestedViews;
      if (nestedViews != null && nestedViews.isNotEmpty) {
        return true;
      }
    } else {
      return true;
    }
  }
  return false;
}