jquery - Adding action handler using data-ember-action in Ember.js -
i noticed when have {{action}} in ember, rendered data-ember-action="somenumber". tried using data-ember-action directly in html , works. want find out id assigned particular action handler , can assign id action handler myself? using jquery datatables plugin display data. data has displayed links , on clicking links action handler must invoked. if try use {{action}} in code renders {{action}} in html. want call action handler called open parameter data.name shown in code below
app.searchview = em.view.extend({ data: function(){ }, tagname:'table', didinsertelement: function(){ var mod=this.get('controller').get('model'); var self=this; this.$().datatable( { "bprocessing": false, "bfilter": false, "binfo": false, "aadata":mod, "aocolumns": [ { "mdata": "name" } ], "aocolumndefs": [ { "fnrender": function ( oobj ) { var data=oobj.adata; return '<br/><a {{action open data.name}}>' + data.name " </a>"; }, "atargets": [0] } ] } );
} });
i found answer problem on different stackoverflow post. yui emberjs datatable ember dynamic link
Comments
Post a Comment