In my current situation, I am facing a challenge with the following line of code:
[matTooltip]="ratingId + 1"
. This line is crucial as it forms part of the arguments for a Material Design button.
However, in this case, things are not straightforward due to our usage of Typescript. The variable ratingId
holds a number, and adding 1 to it also results in a number. On the other hand, the [matTooltip]
directive expects a string value.
I have come across several solutions for converting numbers to strings in Typescript, but none seem to address this particular issue within the template itself.