How to Create a Listener for Dynamically Created Items with a Valve


I'm new to ember and I'm not sure how to create a listener for a dynamic element.

I want to do something similar to this.

$(document).on('click', '.order_here', function(e) {
    //do some actions

In your template:

<div {{action "orderClicked" }}> Order </div>

In your controller:

  actions: {
    orderClicked: function() {
      // handle here.

Also check out emberjs guides.