import { Component , ViewChild , ElementRef , AfterViewInit } from '@angular/core' ; import { constants } from 'smooth-dnd' ; const { wrapperClass , animationClass } = constants ; const constantClasses = { [ wrapperClass ] : true , [ animationClass ] : true , } ; @ Component ( { selector : 'smooth-dnd-draggable' , templateUrl : './draggable.component.html' } ) export class DraggableComponent implements AfterViewInit { @ ViewChild ( 'draggableWrapper' , { static : true } ) wrapper : ElementRef ; ngAfterViewInit ( ) { this . wrapper . nativeElement . parentNode . className = constants . wrapperClass ; } }