Skip to content

Commit

Permalink
fix thanks to @nhardy PR #213
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Jun 20, 2017
1 parent 2e749ee commit 920b052
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 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.2.1",
"version": "1.2.2",
"description": "Angular.js tooltips module.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-tooltips.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-tooltips
* 1.2.1
* 1.2.2
*
* Angular.js tooltips module.
* http://720kb.github.io/angular-tooltips
*
* MIT license
* Tue May 23 2017
* Tue Jun 20 2017
*/
@-webkit-keyframes animate-tooltip {
0% {
Expand Down
26 changes: 13 additions & 13 deletions dist/angular-tooltips.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-tooltips
* 1.2.1
* 1.2.2
*
* Angular.js tooltips module.
* http://720kb.github.io/angular-tooltips
*
* MIT license
* Tue May 23 2017
* Tue Jun 20 2017
*/
/*global angular,window*/
(function withAngular(angular, window) {
Expand Down Expand Up @@ -279,7 +279,7 @@
}
};
}
, tooltipDirective = /*@ngInject*/ ['$log', '$http', '$compile', '$timeout', '$controller', '$injector', 'tooltipsConf', '$templateCache', function tooltipDirective($log, $http, $compile, $timeout, $controller, $injector, tooltipsConf, $templateCache) {
, tooltipDirective = /*@ngInject*/ ['$log', '$http', '$compile', '$timeout', '$controller', '$injector', 'tooltipsConf', '$templateCache', '$q', function tooltipDirective($log, $http, $compile, $timeout, $controller, $injector, tooltipsConf, $templateCache, $q) {

var linkingFunction = function linkingFunction($scope, $element, $attrs, $controllerDirective, $transcludeFunc) {

Expand Down Expand Up @@ -541,17 +541,17 @@

var template = $templateCache.get(tooltipTemplateUrl);

if (typeof template === 'undefined') {

// How should failing to load the template be handled?
template = $http.get(tooltipTemplateUrl).then(function onGetTemplateSuccess(response) {

return response.data;
});
$templateCache.put(tooltipTemplateUrl, template);
if (typeof template !== 'undefined') {
// Wrap template in a Promise so that getTemplate always returns a Promise
return $q.resolve(template);
}

return template;

// How should failing to load the template be handled?
return $http.get(tooltipTemplateUrl).then(function onGetTemplateSuccess(response) {
$templateCache.put(tooltipTemplateUrl, response.data);

return response.data;
});
}
, onTooltipTemplateChange = function onTooltipTemplateChange(newValue) {

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.

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.2.1",
"version": "1.2.2",
"description": "Angular.js tooltips module.",
"homepage": "http://720kb.github.io/angular-tooltips",
"main": "index.js",
Expand Down

0 comments on commit 920b052

Please sign in to comment.