import { Component , OnInit , Input , ViewChild , ElementRef , Output , EventEmitter , } from '@angular/core' ; import { NgForm } from '@angular/forms' ; import { CardComponent } from '../card/card.component' ; import { List } from './list' ; @ Component ( { selector : 'app-list' , templateUrl : './list.component.html' , styleUrls : [ './list.component.css' ] } ) export class ListComponent implements OnInit { @ Input ( ) list : List ; editingName : boolean = false ; @ Output ( ) change : EventEmitter < any > = new EventEmitter ( ) ; constructor ( ) { } ngOnInit ( ) { } editListName ( event ) { this . editingName = event ; this . change . emit ( null ) ; } dropSuccess ( event ) { this . list . addCard ( event . dragData ) ; this . change . emit ( null ) ; } dragSuccess ( event ) { this . list . removeCard ( event . dragData ) ; this . change . emit ( null ) ; } }