Creating a Draggable modal using a Directive

ng g d draggable

this.modalElement = element.closest(".modal-content");
if (event.button === 2 || !this.handleElement) {
return;
if (event.target !== this.handleElement &&!this.searchParentNode(<any>event.target, this.handleElement)) { return;
<div class="modal-header" appDraggable>
<h5 class="modal-title">Add Modal</h5>
<button type="button" class="close pull-right outline-none" aria-label="Close"
(click)="modal.hide()">
<span aria-hidden="true">&times;</span>
</button>
</div>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store