简体   繁体   English

如何在 angular 中的剑道 UI 中访问一个模板中的两个值

[英]How to i can access two values in one template in kendo UI in angular

<kendo-grid-column field="[_id,role]" title="Action"> 
                <ng-template kendoGridCellTemplate let-dataItem>
                  <!-- <span *ngIf="dataItem.ProductID == 1" class="badge badge-success">Online</span> -->
                  <button  class="btn btn-success m-2" style="width: 70px;"  (click)="openDialog(dataItem._id,dataItem.role)" > select Role</button>
              </ng-template>
              </kendo-grid-column>

here I want to get two values _id, role in function Can you please advice me how to I can get both value in function.在这里我想得到两个值 _id,在 function 中扮演角色 你能告诉我如何在 function 中获得两个值吗?

I have resolve this issues we can simply get two value like follows我已经解决了这个问题,我们可以简单地得到如下两个值

<kendo-grid-column field="_id" title="Action"> 
                <ng-template kendoGridCellTemplate let-dataItem>
                  <!-- <span *ngIf="dataItem.ProductID == 1" class="badge badge-success">Online</span> -->
                  <button  class="btn btn-success m-2" style="width: 70px;"  (click)="openDialog(dataItem._id,dataItem.role)" > select Role</button>
              </ng-template>
              </kendo-grid-column>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM