-
Notifications
You must be signed in to change notification settings - Fork 27.4k
support all browser events out of the box (ng:hover) #314
Comments
I think we want to support these events:
All of these (along with current ng:click) are just "wrappers" for events (just $apply the expression and ???stopPropagation of the event), so we want a generic function to create these widgets (as they are all the same). See current ng:click implementation for inspiration. (and refactor ng:click to use the same approach). Note, I listed mouseenter instead of mouseover (and mouseleave instead of mouseout), as I think that's more useful behavior. See jQuery: |
Hey, it looks like the current git code has started breaking these out, making them each separate directives. Why not have a single directive? Really roughly: angularDirective("ng:bindEvent", function(expression, element){ Gives you (I'd have put together a preliminary pull request to spark conversation if there weren't already code that appears to address this. Still figuring gihub's issue system out.) |
@gruber76 Problem with this general solution is bringing new syntax - using semi colon (or any other special character) for splitting the event from expression, so I would definitely prefer multiple directives, it does not hurt and the resulting api is IMHO nicer. Btw, the only missing directive is "hover" - other directives are already implemented. |
we don't have hover, but we do have mouse enter, mouse leave and mouse over. so I think that we covered everything. |
this issue is closed. does this means we have blur and focus events ? |
we now support click dblclick mousedown mouseup mouseover mouseout looks like we forgot blur and focus. can you add a separate bug? On Sun, Aug 19, 2012 at 3:03 AM, Gopal Patel notifications@github.comwrote:
|
we should support all browser events (mouseover, etc) out of the box.
The text was updated successfully, but these errors were encountered: