Skip to content

Instantly share code, notes, and snippets.

@evgenyfedorenko
Last active July 30, 2019 16:50
Show Gist options
  • Save evgenyfedorenko/8b36e73c6215fad5888c6d37fa22b7f6 to your computer and use it in GitHub Desktop.
Save evgenyfedorenko/8b36e73c6215fad5888c6d37fa22b7f6 to your computer and use it in GitHub Desktop.
...
@Component({
selector: 'transaction',
templateUrl: './transaction.html',
styleUrls: ['./transaction.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class TransactionComponent implements OnChanges {
@Input() model: Transaction;
...
ngOnChanges() {
if (this.trService.isInactive(this.model)) {
this.ref.detach();
}
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment