Skip to content

Commit

Permalink
fix for template url cache by @kmoroder
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Aug 5, 2016
1 parent 6dda279 commit f358d40
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-tooltips",
"version": "1.1.5",
"version": "1.1.6",
"description": "Angular.js tooltips module.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-tooltips.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/angular-tooltips.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-tooltips
* 1.1.5
* 1.1.6
*
* Angular.js tooltips module.
* http://720kb.github.io/angular-tooltips
*
* MIT license
* Thu Aug 04 2016
* Fri Aug 05 2016
*/
/*global angular,window*/
(function withAngular(angular, window) {
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-tooltips.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/angular-tooltips.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/angular-tooltips.min.js

Large diffs are not rendered by default.

16 changes: 4 additions & 12 deletions lib/angular-tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
}
}
, onTooltipTemplateUrlChange = function onTooltipTemplateUrlChange(newValue) {
if (newValue) {
if (newValue && !$attrs.tooltipTemplateUrlCache) {

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

Expand Down Expand Up @@ -603,17 +603,9 @@
tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
tipTipElement.empty();
tipTipElement.append(closeButtonElement);
$http.get(newValue).then(function onResponse(response) {

if (response &&
response.data) {

tipTipElement.append($compile(response.data)(scope));
$timeout(function doLater() {

onTooltipShow();
});
}
tipTipElement.append($compile(template)(scope));
$timeout(function doLater() {
onTooltipShow();
});
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-tooltips",
"version": "1.1.5",
"version": "1.1.6",
"description": "Angular.js tooltips module.",
"homepage": "http://720kb.github.io/angular-tooltips",
"main": "index.js",
Expand Down

0 comments on commit f358d40

Please sign in to comment.