¿Cómo activar el modal Angular-Strap con un evento que no sea un evento de clic?

Angular Strap V2's modal seems to have lost some functionality of V1, and I'm struggling to work out how to achieve what was fairly straightforward with V1 (using angular-strap's $modal service).

The documentation only shows an example where the modal is attached to a DOM element like a button and seems to be automatically wired to the click event. However I want to use other events eg SwipeLeft is a common convention for deleting something, but I'd like to pop up an "Are you sure?" modal prompt for this action. Is this possible?

Is there any way to use the V2 modal with any event other than the click event?

preguntado el 28 de mayo de 14 a las 12:05

1 Respuestas

Looking at the source code, it looks like you can bind your own events, or use the default click evento.

It should work if you add a data-trigger='myEvent' a su marcado.

https://github.com/mgcrea/angular-strap/blob/master/src/modal/modal.js#L279

contestado el 28 de mayo de 14 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.