Permalink
Browse files
style(testability): throw a more informative error when getting testa…
…bility The angular.getTestability method requires an element parameter to determine which Angular application to use. Currently, if the element provided is undefined or outside of an Angular app, the error message is 'cannot read property get of undefined'. Improving to a more relevant error message.
- Loading branch information
Showing
with
15 additions
and 1 deletion.
- +9 −0 docs/content/error/ng/test.ngdoc
- +6 −1 src/Angular.js
| @@ -0,0 +1,9 @@ | ||
| @ngdoc error | ||
| @name ng:test | ||
| @fullName Testability Not Found | ||
| @description | ||
|
|
||
| Angular's testability helper, getTestability, requires a root element to be | ||
| passed in. This helps differentiate between different Angular apps on the same | ||
| page. This error is thrown when no injector is found for root element. It is | ||
| often because the root element is outside of the ng-app. |