我动态显示表时无法使用jquery脚本

时间:2017-11-10 10:30:46

标签: javascript jquery angular

我想在Angular 4中加载一个jquery脚本。在html中我有一个显示一些数据的表:

 rescue Exception => e
  raise if raise_exception || Chef::Config[:verbosity] == 2
  humanize_exception(e)
  exit 100
end

我想使用jquery脚本允许我在点击某个td时更改一些数据。

这是我的组件。:

<table class="table">
    <thead class="thead-inverse">
    <tr>
        <th>#</th>
        <th>Hotel name</th>
        <th>Price for night</th>
        <th>Address</th>
        <th>Action</th>
    </tr>
    </thead>
    <tbody>
        <tr *ngFor="let hotel of hotels">
            <td>{{hotel.id}}</td>
            <td>{{hotel.name}}</td>
            <td>{{hotel.pricePerNight}}</td>
            <td>{{hotel.address.city}}{{hotel.address.country}}</td>                                
        </tr>
    </tbody>
</table>

数据显示完美,但当我点击任何列时,我什么也得不到。 (我用和...制作了一个简单的代码静态表,它可以工作,但在动态版本中它不起作用) 任何帮助!

0 个答案:

没有答案