import { Component , OnInit , Input , Output , EventEmitter } from '@angular/core' ; @ Component ( { selector : 'app-button' , templateUrl : './button.component.html' , styleUrls : [ './button.component.scss' ] } ) export class ButtonComponent implements OnInit { disabled ; constructor ( ) { } @ Output ( ) onClickInner = new EventEmitter ( ) ; ngOnInit ( ) { } onButtonClick ( ) { if ( ! this . disabled ) { this . onClickInner . emit ( ) ; } } }