0

I want to have a custom close in controller that when I click the OK in alert it will close the lightbox also but I dont know how to make it. This is the link

Lightbox

1 Answers1

0

Alert box doesn't return value on click function. what u need is a confirm box

var r = confirm("message");
if (r) {
   Lightbox.closeModal()
}

Also, inject the Lightbox to the controller.

Sachila Ranawaka
  • 39,756
  • 7
  • 56
  • 80