I have an angular 2 web application that fires some events. On of the properties of event.target.parentNode looks like this. The nodeValue and value show [object Object]. How can I get the actual content of this object?
Edited to add code:
pressed(event, item: someItem) {
console.log(event);
console.log(event.target.parentNode.attributes[1].value);
console.log("pressed");
}
<div class="grid" [ngGrid]="{'max_cols': 3, 'auto_resize': true}">
<sticky-note *ngFor="let item of items"
[stickyNote]="sNotes" class="grid-item" [(ngGridItem)]='item.config'
(onDragStop)="dragged(item)" (press)="pressed($event, item)" (pressup)="pressedup($event, item)" #gItem> </sticky-note>
</div>
Aucun commentaire:
Enregistrer un commentaire