mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refact(delegateService): fix error message
This commit is contained in:
4
js/angular/service/delegateService.js
vendored
4
js/angular/service/delegateService.js
vendored
@@ -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.'
|
||||
);
|
||||
|
||||
@@ -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();
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user