当我控制事件的值时,我正在使用droppable事件,该事件的值以这种类型显示数据:-
console.log('event-d--', event.target.childNodes[4]);
this is result
dataset:DOMStringMap {sectionvalue: "599a974a7c086869cba64435"}
但是当我获取数据时,这里显示的是未定义的代码:-
console.log('event-d--', event.target.childNodes[4].dataset["sectionValue"]);
显示未定义,我也尝试过:-
console.log('event-d--', event.target.childNodes[4].dataset["sectionvalue"]);
console.log('event-d--', event.target.childNodes[4].dataset.sectionvalue);
但是没有运气,这是我的HTML代码:-
<td *ngFor="let doctor of calendarUsers" style="width:10%; border-right: 1px solid #eee;">
<ul id="{{doctor.id}}" class="connectedSortable">
<li *ngFor="let calendarAppointment of calendarAppointments | filterBy: {resourceId : doctor.id}" class="ui-state-default"
attr.data-sectionvalue="{{doctor.id}}" ></li>
</ul>
</td>