mazdik / ng-modal

Angular resizable and draggable modal component
https://mazdik.github.io/ng-modal/
82 stars 43 forks source link

[help] How do you use the draggable modals ? #8

Closed borisBelloc closed 4 years ago

borisBelloc commented 4 years ago

Hello,

I installed the package npm i ng-modal-lib --save

but I don't understand how to use the modal ?

in the exemple html code, there is code like (closeModal)="onCloseModal()"> (click)="modalRoot.hide()" [...]

How do you define the methods it in the xxx.component.ts file ? I don't find any infos on the repository and I don't understand how the snippet could work without definition.

Thank you

Regards

mazdik commented 4 years ago

sample or @ViewChild('modalRoot', { static: false }) modalRoot modalRoot.show()

borisBelloc commented 4 years ago

thank you for your reply, it works!

I will search if ng-modal can make modal from ngb draggable 😬