Skip to content

Commit

Permalink
Merge pull request #106 from geo242/support-angular-latest
Browse files Browse the repository at this point in the history
Fix to support angular 1.6.x
  • Loading branch information
cgross authored Jan 5, 2017
2 parents f2e3261 + c3bd5dc commit 54d5317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions angular-busy.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
currentTemplate = options.templateUrl;
backdrop = options.backdrop;

$http.get(currentTemplate,{cache: $templateCache}).success(function(indicatorTemplate){
$http.get(currentTemplate,{cache: $templateCache}).then(function(indicatorTemplate){

options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop;

Expand All @@ -220,7 +220,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
element.append(backdropElement);
}

var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate + '</div>';
var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate.data + '</div>';
templateElement = $compile(template)(templateScope);

angular.element(templateElement.children()[0])
Expand All @@ -231,7 +231,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
.css('bottom',0);
element.append(templateElement);

}).error(function(data){
}, function(data){
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
});
}
Expand Down

0 comments on commit 54d5317

Please sign in to comment.