import { Component , OnInit , Input , Output , EventEmitter , ChangeDetectionStrategy } from '@angular/core' ; import { Project } from '../../../projects/models/project.model' ; @ Component ( { selector : 'app-project' , templateUrl : './project.component.html' , styleUrls : [ './project.component.scss' ] , changeDetection : ChangeDetectionStrategy . OnPush } ) export class ProjectComponent implements OnInit { @ Input ( ) project : Project ; @ Input ( ) editable = true ; @ Output ( ) deleted = new EventEmitter < Project > ( ) ; @ Output ( ) edited = new EventEmitter < Project > ( ) ; constructor ( ) { } ngOnInit ( ) { } onDelete ( ) { this . deleted . emit ( this . project ) ; } onEdit ( ) { this . edited . emit ( this . project ) ; } }