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

nonassign $compile error message is vague #13827

Closed
wesleycho opened this issue Jan 22, 2016 · 0 comments
Closed

nonassign $compile error message is vague #13827

wesleycho opened this issue Jan 22, 2016 · 0 comments

Comments

@wesleycho
Copy link
Contributor

Oftentimes the error message thrown by

angular.js/src/ng/compile.js

Lines 3122 to 3124 in d98c5f0

throw $compileMinErr('nonassign',
"Expression '{0}' used with directive '{1}' is non-assignable!",
attrs[attrName], directive.name);
is vague, and is hard to determine exactly what is wrong.

For example, the error message I am seeing is Error: [$compile:nonassign] http://errors.angularjs.org/1.4.9/$compile/nonassign?p0=undefined&p1=foo, which does not tell me the attribute name.

Tweaking the text on this to output the attribute name could be a huge boon, and a minimal addition - I can open a PR for this if desired.

@wesleycho wesleycho changed the title nonassign $compile error message vague nonassign $compile error message is vague Jan 22, 2016
wesleycho added a commit to wesleycho/angular.js that referenced this issue Jan 23, 2016
- Improve error message to mention attribute the expression errored on

Fixes angular#13827
@Narretz Narretz added this to the Backlog milestone Jan 23, 2016
Narretz pushed a commit that referenced this issue Jan 24, 2016
- Improve error message to mention attribute the expression errored on

Fixes #13827

Closes #13828
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants