0

page contains table with entities and when user clicks modal window appears with own model

refusals.hbs:

{{#each model}}
    <tr>
        <td>{{#link-to 'refusal' this}}{{id}}{{/link-to}}</button></td>
        <td>{{username}}</td>
        <td>{{fullname}}</td>
        <td>{{regnumber}}</td>
        <td>{{type}}</td>
        <td>{{amount}}</td>
    </tr>
{{/each}}
    {{outlet}}

refusal.hbs:

<div class="modal fade" id="refusalModal">
    <div class="modal-dialog"> {{username}}
     ...
    </div>
</div>

Searching for examples lead me to ember view, so my questions is: is there a true standard way to operate with modals? My example works fine except i don't know where to call $('#refusalModal').modal('show')

4

1 回答 1

3

对此进行了很多讨论。

亚当霍金斯有一个帖子

还有一些关于这个的拉取请求, PR1PR2

这也有一个讨论线程

受到这一切的启发,

这是Ember-Bootstrap Modals的最新Jsbin

于 2013-09-06T09:43:58.850 回答