This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Angular does not throw exception for un-assigned bi-directional scope property #6060
Milestone
Comments
panuhorsmalahti
added a commit
to panuhorsmalahti/angular.js
that referenced
this issue
Jan 30, 2014
Documentation states that NON_ASSIGNABLE_MODEL_EXPRESSION exception should be thrown if a two-way attribute doesn't exist. This commit adds a simple test and throws an error if the property is missing. Note that the documentation should probably be updated and a different exception should be thrown using minErr. This commit refers to issue angular#6060
My patch seems to fix the issue. However, docs/content/error/compile doesn't really have a suitable error message (and it looks like those should be preferred over the documentation's NON_ASSIGNABLE_MODEL_EXPRESSION). |
ghost
assigned tbosch
Jan 31, 2014
Note that right now if the value in the isolate scope changes and there is no attribute, there is also a very obscure exception. Solving this issue would also prevent that case early on. |
panuhorsmalahti
added a commit
to panuhorsmalahti/angular.js
that referenced
this issue
Nov 24, 2014
Documentation states that NON_ASSIGNABLE_MODEL_EXPRESSION exception should be thrown if a two-way attribute doesn't exist. This commit adds a simple test and throws an error if the property is missing. Note that the documentation should probably be updated and a different exception should be thrown using minErr. This commit refers to issue angular#6060
There is a PR for this #6064 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
please see demo - notice that
foo
is not assigned yet there is no exception in console. Per$compile
docs exception should be raised, sincefoo
is non-optional:nice to have: IMO attributes should be treated in the same way: required unless
?
is usedThe text was updated successfully, but these errors were encountered: