【发布时间】:2016-12-08 00:34:22
【问题描述】:
我有 Angular js 表,我想添加一个文本字段以包含过滤/搜索功能,但自动图标显示位置错误
这是我的看法
<table>
<theader>
<tr>
<th at-attribute="Car_ID">
Test <br />
<input type="text" id="filter_id" ng-model="filter_id" />
</th>
</tr>
</theader>
</table>
如何使排序箭头显示在Test 旁边。我想那里看起来会更好。除非我反应过度。或者我如何在第一个下方创建另一个<tr> 以显示search texts?
这是渲染 html,<i> 元素是为 angular-table 自动生成的。
<th at-attribute="Car_ID" ng-click="predicate = 'Car_ID'; descending = !descending;" width="">
Test <br>
<input type="text" id="filter_id" ng-model="filter_id" class="ng-pristine ng-untouched ng-valid">
<i style="margin-left: 10px;" ng-class="getSortIcon('Car_ID', predicate, descending)" class="glyphicon glyphicon-chevron-down"></i>
</th>
【问题讨论】:
-
我不明白。测试后显示。你能在图片上显示你想在哪里渲染图标吗?
-
@HamletHakobyan 我认为应该在右侧,不应该更好吗?
-
是什么生成了图标?
-
@mtb
angular-tablesamu.github.io/angular-table/examples/examples.html
标签: javascript html css angularjs