import { Component } from '@angular/core' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] } ) export class AppComponent { constructor ( ) { } config = { showActionButtons : true , showAddButtons : true , showRenameButtons : true , showDeleteButtons : true , showRootActionButtons : true , enableExpandButtons : true , enableDragging : true , rootTitle : 'My Tree' , validationText : 'need valid' , minCharacterLength : 7 , setItemsAsLinks : false , setFontSize : 24 , setIconSize : 16 } ; myTree = [ ] ; onDrop ( event ) { console . log ( this . myTree ) ; console . log ( event ) ; } onStartDelete ( event ) { console . log ( 'on start delete item' ) ; console . log ( this . myTree ) ; console . log ( event ) ; } onFinishDelete ( event ) { console . log ( 'on finish delete item' ) ; console . log ( this . myTree ) ; console . log ( event ) ; } onCancelDelete ( event ) { console . log ( 'on cancel delete item' ) ; console . log ( this . myTree ) ; console . log ( event ) ; } onadditem ( event ) { console . log ( this . myTree ) ; console . log ( event ) ; } onStartRenameItem ( event ) { console . log ( 'start rename' ) ; console . log ( this . myTree ) ; console . log ( event ) ; } onFinishRenameItem ( event ) { console . log ( 'finish rename' ) ; console . log ( this . myTree ) ; console . log ( event ) ; } }