小编Can*_*ara的帖子

Angular获取表中所选行的数据

Angular4也被给予*ngFor tabloda列出.我想从传入的数据中获取"ID"信息.我怎样才能做到这一点?

<tbody>
    <tr *ngFor="let item of empleyoo">
        <th scope="row" >{{item.Id}}</th> /*this row data get*/
        <td>{{item.name}}</td>
        <td>{{item.surname}}</td>
        <td>{{item.code}}</td>
       <button type="button" class="glyphicon glyphicon-check"></button>
    </tr>       
<tbody>
Run Code Online (Sandbox Code Playgroud)

打字稿

public GetId()
{
    var id=
}
Run Code Online (Sandbox Code Playgroud)

angular

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

angular ×1