1
我試圖以響應式方式單擊我表格中的一個元素,但它不起作用。看來,NG-點擊並不完美..ng-click無法在響應角度數據表格中工作
這是我的HTML表格:
<table id="listadifferite" datatable="ng" dt-options="myController.dtOptions"
class="table table-bordered table-striped" cellspacing="0" width="100%">
<thead>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
</thead>
<tbody>
<td data-dt-column="{{differite.idDif}}_0" class="text-center">Prova</td>
<td data-dt-column="{{differite.idDif}}_1" class="text-center">
<a ng-click="controllerDif.mostraDettaglio(differite)"><i class="fa fa-search-plus"></i></a>
</td>
<td data-dt-column="{{differite.idDif}}_2" class="text-center">Prova</td>
<td data-dt-column="{{differite.idDif}}_3" class="text-center">Prova</td>
</tr>
</tbody>
</table>
,這是dtOptions在myController的:這裏
self.dtOptions = DTOptionsBuilder.newOptions()
.withPaginationType('full_numbers')
.withOption('responsive', {
details: {
type: 'column',
target: 0
}
})
另一個類似的問題:https://github.com/l-lin/angular-datatables/issues/552
是一個重複的範圍內的點擊?您可能需要通過'$ parent.controllerDif.mostraDettaglio(differite)' –
來引用父範圍,但它不起作用。 – user3195053