Skip to content

Commit 54d5317

Browse files
authored
Merge pull request #106 from geo242/support-angular-latest
Fix to support angular 1.6.x
2 parents f2e3261 + c3bd5dc commit 54d5317

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

angular-busy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
210210
currentTemplate = options.templateUrl;
211211
backdrop = options.backdrop;
212212

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

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

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

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

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

234-
}).error(function(data){
234+
}, function(data){
235235
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
236236
});
237237
}

0 commit comments

Comments
 (0)