mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(delegates): improve warning when a controller can't be found
This commit is contained in:
11
js/angular/service/delegateService.js
vendored
11
js/angular/service/delegateService.js
vendored
@@ -65,9 +65,14 @@ function delegateService(methodNames) {
|
||||
|
||||
if (!matchingInstancesFound) {
|
||||
return $log.warn(
|
||||
'Delegate for handle "'+this.handle+'" could not find a',
|
||||
'corresponding element with delegate-handle="'+this.handle+'"!',
|
||||
methodName, 'was not called!');
|
||||
'Delegate for handle "'+this.handle+'" could not find a ' +
|
||||
'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="messagesScroll" 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.'
|
||||
);
|
||||
}
|
||||
|
||||
return finalResult;
|
||||
|
||||
Reference in New Issue
Block a user