这是动态轮播代码 我需要从代码中给出的EDIT选项中调用一个angular2函数名称editAppointment,我已经尝试了所有可能的选项,可以使用JQuery
str+=`<div class="item">
<img src="`+this.eventData[0].events[i].images +`" style="display:none;" >
<br/>
<div class="row">
<div class="col-sm-3" (click)="editAppointment()">EDIT</div>
<div class="col-sm-4" style="font-size:18px;">APPOINTMENTS</div>
<div class="col-sm-4 text-right id="delete-appointment">DELETE</div>
</div>
<br/>
<br/>
<h5 class="text-center" style="font-weight:bold">TIME</h5>
<hr style="margin:5px;">
<p class="text-center">`+mydate+`</p>
<br/>
<h5 class="text-center" style="font-weight:bold">DURATION</h5>
<hr style="margin:5px;">
<p class="text-center">`+parseInt(""+this.eventData[0].events[i].specificDate.duration/60)+` mins</p>
<br/>
<h5 class="text-center" style="font-weight:bold">LOCATION</h5>
<hr style="margin:5px;">
<p class="text-center">`+this.eventData[0].events[i].specificDate.location+`</p>
<br/>
<h5 class="text-center" style="font-weight:bold">NOTES</h5>
<hr style="margin:5px;">
<p class="text-center">`+this.eventData[0].events[i].specificDate.notes+`</p>
<br/>
</div>
`;
}
我需要从EDIT Option调用Angular2函数 函数名称是editAppointment();
答案 0 :(得分:0)
您的代码看起来不错。这个问题可能是由css 引起的(默认引导程序或你的样式)。你的EDIT div可能会继承一个不同的位置值。
你可以做些什么?