2.0.0 • Published 3 years ago

ngb-modal-draggable v2.0.0

Weekly downloads
18
License
MIT
Repository
-
Last release
3 years ago

NgbModalDraggable

Angular Directive used for make ngbModal draggable

Install

npm i ngb-modal-draggable --save

How to use

First import NgbModalDraggableModule in your modules

import { NgModule } from '@angular/core';
import { NgbModalDraggableModule } from 'ngb-modal-draggable'

@NgModule({
    imports: [
        ....

        NgbModalDraggableModule
    ],
    ...
})

Then just use in your modal component html

<div ngb-modal-draggable [ngbModalDraggableHandle]="draggableHandle">
  <div #draggableHandle class="modal-header">
    <h4 class="modal-title" id="modal-basic-title">Profile update</h4>
    <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  ...
</div>

Properties

InputTypeDefaultDescription
ngbModalDraggableHandleHTMLElementnullUse template variable to refer to the handle element. Then only the handle element is draggable
ngbModalRootLevelnumber2Set the root level from current element which set the directive. If you set the directive on the root element of the NgbModal component, the true root level would be 2 as the NgbModalService would add two parent element automatically
1.0.4

3 years ago

2.0.0

3 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago