I want to get paragraph text within div when I click on div. I tried getElementsByTagName()
but it doesn't work. Here is the code :
HTML :
<div class="tile" style="left:40px;top:55px;" (click)="getTextFromHiddenParagraph(event)">
<p>{{this.terms[0].termName}}</p>
<p hidden>{{this.terms[0].connectionName}}</p>
</div>
I would like to access content within hidden paragraph when I click on parent div.
Please help!