Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

pass button value to javascript function

<!--dont forget to add value property if you wanna access value of button-->
<button  #btn  class="btn btn-success" value="{{order.data.order_status}}" 
        (click)="onClick(order.key,btn)">{{order.data.order_status}}
</button>

<!--on click .ts file-->
onClick(key:any,btn_value:HTMLButtonElement)
 
PREVIOUS NEXT
Tagged: #pass #button #javascript #function
ADD COMMENT
Topic
Name
6+6 =