import { Component, OnInit, Input,Output,EventEmitter } from '@angular/core'; @Component({ selector: 'list-view-checkout', templateUrl: './list-view-checkout.component.html' }) export class ListViewCheckoutComponent implements OnInit { @Input() checked: boolean; @Input() id: string; @Input() disabled: boolean; @Output() checkedChange = new EventEmitter(); constructor() { } ngOnInit() { } handleClick(event: MouseEvent) { event.stopPropagation(); if (!this.disabled) { this.checkedChange.emit({originalEvent: event, checked: !this.checked}); } } }