angular2-draggable
angular2-draggable copied to clipboard
ngDraggable not working for content loaded with innerHtml angular2+
I am getting an HTML file from the backend that I am displaying in angular with inner Html in a div tag. In that ngDraggable in HTML file is not recognized, that is not processed by angular as like directive
Angular:
<div *ngIf="content" class="content" [innerHTML]="sanitize.bypassSecurityTrustHtml(content)"></div>
Html from backend:
<div class="container" contenteditable="true" id="div0" style="position : relative;">
<div id="div1" style="position : relative; margin : 2%; height : 554.5px">
<input class="form-control" id="textbox1" name="textbox1" style="top : 195.21px; left : 297.61px; position : absolute; width : 20%;" type="text">
<button ngDraggable class="btn-primary" id="button1" style="top : 367.03px; left : 189.82px; position : absolute;">Button</button>
</div>
</div>
In this, on button tag, I am giving ngDraggable that I am no able to drag after loaded to angular from the backend
@xieziyu can u check this