我已在angular 6中创建了动态按钮。如何找出打字稿中触摸了哪个按钮。
assigndynamicfields() {
setTimeout(() => {
this.getRecord();
//call service and assign dynamic config data
this.fieldsData.push({
name: "save",
type: "button",
label: "Save"
},
{
name: "delete",
type: "button",
label: "Delete"
}
)
;
this.regConfig = this.fieldsData;
this.form = DynamicFormComponent;
}, 500)
}