0

I am new to Handlebars.js, ember.js and currently in learning phase. I have created one table in which i am loading data dynamically. Also, I have added two columns for edit and delete action in table dynamically. Now, for each row there is one edit and one delete button available. Here is the code for the edit button which I added in table dynamically,

<button type='button' id='modaledit' class='btn btn-primary btn-mini' {{action 'showmodal1'}}>Edit</button>

But when I click the Edit button nothing is happening, I have created response for {{action 'showmodal1'}} in controller but it is not executing.

When I tried to use jQuery's .live() function in the view (in didInsertElement), it is showing the following error :

Uncaught TypeError: Object [object Object] has no method 'live'

Can anyone help me to solve this issue?

4

1 回答 1

0

我真的不知道你想使用 jQuery 的.live()函数是什么,但这里有一个简单的例子,说明如何action从视图中触发,正确调用相应控制器中的相应方法:http: //jsbin.com/ewenuj/2 /编辑

希望能帮助到你。

于 2013-08-04T11:34:59.487 回答