I would like to display different lists (defined by a component), but display their headers only if a necessary Output is produced by the child component.
Say I have a component that, among other things, @Outputs an event, like so
export class ItemListComponent implements OnInit {
@Input()
private filter: (t: Item) => boolean;
private tasks: TaskItem[];
@Output()
isEmpty = new EventEmitter();
In my other component I display this list, by injecting a necessary filter, like so
<div> list header <-- I would love to hide that -->
<app-item-list [filter]="filter" *ngIf="!(isEmpty)">
</app-item-list>
</div>
I can hide the item list depending on the (isEmpty), but can I hide the div above?