Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 0c9e369

Browse files
author
kmoroder
committed
Removes http request from caching function, adds additional modifier in template change function
1 parent e9751f7 commit 0c9e369

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

dist/angular-tooltips.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@
580580
}
581581
}
582582
, onTooltipTemplateUrlChange = function onTooltipTemplateUrlChange(newValue) {
583-
if (newValue) {
583+
if (newValue && !$attrs.tooltipTemplateUrlCache) {
584584

585585
$http.get(newValue).then(function onResponse(response) {
586586

@@ -613,17 +613,9 @@
613613
tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
614614
tipTipElement.empty();
615615
tipTipElement.append(closeButtonElement);
616-
$http.get(newValue).then(function onResponse(response) {
617-
618-
if (response &&
619-
response.data) {
620-
621-
tipTipElement.append($compile(response.data)(scope));
622-
$timeout(function doLater() {
623-
624-
onTooltipShow();
625-
});
626-
}
616+
tipTipElement.append($compile(template)(scope));
617+
$timeout(function doLater() {
618+
onTooltipShow();
627619
});
628620
}
629621
} else {

0 commit comments

Comments
 (0)