refact(delegateService): fix error message

This commit is contained in:
Andy Joslin
2014-04-16 06:17:43 -06:00
parent 104c642019
commit 5ce4dfeca9
2 changed files with 5 additions and 5 deletions

View File

@@ -65,10 +65,10 @@ function delegateService(methodNames) {
if (!matchingInstancesFound) {
return $log.warn(
'Delegate for handle "'+this.handle+'" could not find a ' +
'corresponding element with delegate-handle="'+this.handle+'"!' +
'corresponding element with delegate-handle="'+this.handle+'"! ' +
methodName + '() was not called!\n' +
'Possible cause: If you are calling ' + methodName + '() immediately, and ' +
'your element with delegate-handle="' + methodName + '" is a child of your ' +
'your element with delegate-handle="' + this.handle + '" is a child of your ' +
'controller, then your element may not be compiled yet. Put a $timeout ' +
'around your call to ' + methodName + '() and try again.'
);

View File

@@ -13,20 +13,20 @@ describe('$ionicLoading service', function() {
it('should retain backdrop if !noBackdrop and !isShown', inject(function($ionicLoading, $ionicBackdrop) {
spyOn($ionicBackdrop, 'retain');
var loader = TestUtil.unwrapPromise($ionicLoading._getLoader());
loader.show({})
loader.show({});
expect($ionicBackdrop.retain).toHaveBeenCalled();
}));
it('should not retain backdrop if noBackdrop', inject(function($ionicLoading, $ionicBackdrop) {
spyOn($ionicBackdrop, 'retain');
var loader = TestUtil.unwrapPromise($ionicLoading._getLoader());
loader.show({ noBackdrop: true })
loader.show({ noBackdrop: true });
expect($ionicBackdrop.retain).not.toHaveBeenCalled();
}));
it('should not retain backdrop if isShown', inject(function($ionicLoading, $ionicBackdrop) {
spyOn($ionicBackdrop, 'retain');
var loader = TestUtil.unwrapPromise($ionicLoading._getLoader());
loader.isShown = true;
loader.show({})
loader.show({});
expect($ionicBackdrop.retain).not.toHaveBeenCalled();
}));