ember.js - target route action instead of controller when itemcontroller specifiec -
i iterating on collecion using itemcontroller this:
{{#each col itemcontroller="colitem"}} <li> <a {{action doaction this}} href="#">{{name}}</a> </li> {{/each}}
i want doaction go route , not itemcontroller.
i have doaction defined in route this:
radium.someroute = ember.route.extend events: doaction: (status)->
if remove itemcontroller dispatched route. can target route action somehow?
assuming controller instance of ember.controller , has not implemented it's own doaction
, event should automagically bubble route.
it may ember bug, seems events not bubble router when specify item controller via {{#each}}
helper.
as workaround, can instead specify itemcontroller property of parent controller.
app.itemscontroller = ember.arraycontroller.extend({ itemcontroller: "item" });
i've created jsbin demonstrate workaround: http://jsbin.com/anesop/2/edit
ember.js
No comments:
Post a Comment