AngularJS enlazar evento movemove en vivo

I'm pretty new to AngularJS and I've been wondering - How can I bind a mousemove event so a rectangular box shows up right next to the mouse pointer and is dynamic (changing size when moving the pointer)?

I know that jQuery selectable exists but I'm trying to avoid jQuery for this project and use Angular only.

Cualquier ayuda sería apreciada. ¡Gracias!

Thanks all for your help! I'll make a pure JS function to do this.

preguntado el 12 de junio de 14 a las 10:06

For this kind of issue,one would have to do DOM manipulation anyway.I dont really see how angular api would help.angular.element api is quite limited.You could find a script that do the same thing without requiring jquery-ui though,or port selectable to pure DOM. -

1 Respuestas

Angular uses dirty checking and digest cycles to handle change events. It was not built to handle continuous changes like tracking mouse movements. That is one sure way of grinding your application to a slow crawl. There are some things that jQuery is better suited for - this is one of them.

Respondido el 12 de junio de 14 a las 10:06

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