docs(delegates): improve warning when a controller can't be found

This commit is contained in:
Andy Joslin
2014-04-14 13:55:27 -06:00
parent 4216266f21
commit e5ddca34ff

View File

@@ -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;