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