Kendo Tooltip HTML content
Last updated
Last updated
Application Developer notes
The example illustrating the use of Tooltip with a template behaves differently than most KendoUI Aurelia components, as stated in the Documentation tab on
The tooltip does not compile templates like normal controls, so for this particular sample we recommend to use Kendo templates instead
This was recently mentioned in our support discussions as:
"When I use aurelia repeat syntax in <script ref="template" type="text/x-kendo-template">
it does not do anything. Is there any way to build dynamic template based on HTML, not via javascript?"
Example
By default the template compilation process is trigged by the Kendo control via a certain hook. Most controls calls this hook and aurelia templates will be compiled correctly. The problem is that some controls don't call this hook. Kendo templates would still work, but Aurelia templates won't.
The tooltip is one of those controls that doesn't call the hook. So templates have to be compiled manually, if you want to take that route. The problem is in the timing, how would you know when the Kendo control has added a template to the DOM so that you can trigger the compilation process? This is tricky, and is different per Kendo control. For example, the grid has a dataBound event that notifies you when the rows have been rendered, but other controls may not have such event.
In my opinion, the best way would be to fix this at the source, by creating a PR to the so that the tooltip calls the angular hook (which we use to start compiling aurelia templates)