Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
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

Description

@wesleycho

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions