import { Component , OnInit , Input , Output , EventEmitter , ElementRef } from '@angular/core' ; @ Component ( { selector : 'app-comp-list' , templateUrl : './comp-list.component.html' , styleUrls : [ './comp-list.component.scss' ] } ) export class CompListComponent implements OnInit { @ Input ( ) compList : any ; @ Input ( ) currnetPageComps : any ; @ Output ( ) compDragEvent = new EventEmitter < any > ( ) ; constructor ( private elementRef ) { } ngOnInit ( ) { } dragCompEnd ( event , data , idVal ) { if ( ! ! this . currnetPageComps ) { event [ 'compType' ] = data ; this . compDragEvent . emit ( event ) ; } } }