Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 2x 2x 2x 2x 2x 1x 1x | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; @Component({ selector: 'ish-filter-collapsible', templateUrl: './filter-collapsible.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) export class FilterCollapsibleComponent implements OnInit { @Input({ required: true }) title: string; @Input() collapsed: boolean; @Output() collapsedChange = new EventEmitter<boolean>(); isCollapsed = false; ngOnInit() { this.isCollapsed = this.collapsed; } toggle() { this.isCollapsed = !this.isCollapsed; this.collapsedChange.emit(this.isCollapsed); } } |