krescruz / angular-materialize

Angularjs directives for Materialize CSS Framework https://github.com/Dogfalo/materialize
MIT License
397 stars 129 forks source link

Rerender tooltip when data changes #212

Closed Kaisle closed 7 years ago

Kaisle commented 7 years ago

If the value of data-tooltip changes, the tooltip text is not updated. You can observe this by passing an angular binding to the data-tooltip attribute and change this binding programmatically. The DOM will be updated with the new value of data-tooltip but the text that appears when you hover over the tooltip does not contain the new value.

To solve this I have set up a watch for the data-tooltip attribute and I render the tooltip again once the value of this attribute changes.