Angularjs lightbox custom close in controller

94 views Asked by At

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

There are 1 answers

3
Sachila Ranawaka On BEST ANSWER

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.