我正在尝试掌握出色的 Ng-Grid 模块。我发现它是一个非常棒的模块,但是我在使用单元格中找到的 ID 号作为链接时遇到了问题。我的 columnDefs 选项如下所示:
columnDefs: [
{field: 'name', displayName: 'Name', cellTemplate: '<div class="ngCellText"><a href="/#/monitor/ROWIDNUMBER">{{col.field}}</a></div>'},
{field: 'description', displayName: 'Description'},
{field: 'type', displayName: 'Type'}
]
我想在名称列的 href 标签中添加/#/monitor/row.this.id。
最佳答案
我觉得表达应该是这样的
<a href="/#/monitor/{{row.getProperty('id')}}">
关于javascript - AngularJs Ng-Grid 从另一个字段添加带有 Id 的链接到模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20247894/