Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Better error message with transclude / ng-transclude #3759

Closed
rngadam opened this issue Aug 27, 2013 · 0 comments
Closed

Better error message with transclude / ng-transclude #3759

rngadam opened this issue Aug 27, 2013 · 0 comments

Comments

@rngadam
Copy link

rngadam commented Aug 27, 2013

Based on this transclude example: http://jsfiddle.net/ospatil/A969Z/

If we remove transclude: true from the directive (imagine that the programmer has forgotten it), this is the error message generated:

TypeError: undefined is not a function
    at new R.controller (http://code.angularjs.org/1.1.0/angular.min.js:145:411)
    at d (http://code.angularjs.org/1.1.0/angular.min.js:27:283)
    at Object.instantiate (http://code.angularjs.org/1.1.0/angular.min.js:27:413)
    at http://code.angularjs.org/1.1.0/angular.min.js:50:428
    at http://code.angularjs.org/1.1.0/angular.min.js:42:146
    at m (http://code.angularjs.org/1.1.0/angular.min.js:6:312)
    at k (http://code.angularjs.org/1.1.0/angular.min.js:42:8)
    at e (http://code.angularjs.org/1.1.0/angular.min.js:38:207)
    at k (http://code.angularjs.org/1.1.0/angular.min.js:42:253)
    at e (http://code.angularjs.org/1.1.0/angular.min.js:38:207) 

Suggest a better error message here:

ng-transclude directive called but no content to be transcluded - have you forgotten to set transclude: true?
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant