I have a view which contains a close button:
.flash-message
div class="close-button" click="view.removeFlash"
= view view.content.thisView
The view itself reads:
Whistlr.AlertView = Ember.View.extend
templateName: "_alert"
removeFlash: ->
alert "Close!"
However, when I click on the "close-button" div, nothing happens. I've tried rewriting the button a few different ways:
click="view.removeFlash"
click="removeFlash"
click="removeFlash" target="view"
I've also tried placing the action directly in the controller (though I'm not even sure there is a controller for the view):
Whistlr.AlertController = Ember.ObjectController.extend
removeFlash: ->
alert "I work!"
None of these approaches work. Perhaps it's not even possible to send an action to the view like I would with a controller? If not, how else can I approach this problem?