I have a form with a id :
<form id="dummyForm">
<input type="text">
<input type="submit" value="click me">
</form>
and a div with data attribute, which contains form's id :
<div attr.data-form-id="dummyForm" (click)=hideForm()>Click to hide</div>
how can I get the data-form-id
value in hideform()
function. so that I can hide the form.
Any Help?
<div attr.data-form-id="dummyForm"
#me
(click)="hideForm(me.getAttribute('data-form-id'))">
Click to hide
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With