【发布时间】:2018-02-20 09:41:43
【问题描述】:
【问题讨论】:
-
你不能将它们作为参数传递吗?
标签: angular angular2-template primeng ngfor
【问题讨论】:
标签: angular angular2-template primeng ngfor
点击项目,将项目信息传递给showDialog方法。在您的对话框中显示传递的信息如下:
<h2>{{this.profileSelected}}</h2>
<p (click)="showDialog(item)"></p>
在你的组件中创建一个成员变量profileSelected来存储点击的项目如下:
showDialog(item){
this.profileSelected = item;
this.display=true;
}
【讨论】: