Naveen K K Naveen K K - 5 months ago 6
HTML Question

How do i get the value in an anchor tag?

For getting value in input tag we can use

<id>
.value like

<input type="text" #solutionInput (keyup)="0"><br>
<solutionDetail [solutionName]="solutionInput.value" > </solutionDetail>


where 'solutionInput' is
<id>
here.

For an anchor tag, how can we get the value "CEP" as in below?

<a href="#" data-toggle="modal" data-target="#myModal1"> CEP </a>

Answer
<a href="#" data-toggle="modal" data-target="#myModal1" #link> CEP </a>

the you can access it with

link.innerText