I have a div element in my HTML like so
<div (click) = onPaginationClick()>next</div>
My question is : How to pass a string to the onPaginationlick() function ? when i try to pass it like this :
<div (click)=onPaginationClick("myString")>next</div>
I have a parse template error.
Enyone can help ?
You need to wrap the whole expression in quotes if it itself contains quotes:
<div (click)="onPaginationClick('myString')">next</div>
you need to use nested quotes:
<div (click)="onPaginationClick('helloworld')">next</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