How do I use mouseenter and mouseleave events?

I am using

and I am not sure how to use the mouseenter and mouseleave events. My code is below and the click event is working fine. How can I get mouseenter and mouseleave events?

window.App = Ember.Application.create()

TestView = Ember.View.create
  template: Ember.Handlebars.compile 'This is the view'
  click: (evt) ->
    console.log 'clicked'
  mouseenter: (evt) ->
    console.log 'mouse enter'
  mouseleave: (evt) ->
    console.log 'mouse leave'




source to share

1 answer

Events inside Ember.js are handled Ember.EventDispatcher

and the names will be translated to the more conditional Ember.js convention if you see here .

You should change mouse events to mouseEnter

and mouseLeave