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

Error 'text is undefined undefined' when directive's scope property 'bind' is undeclared in element #909

Closed
johnlindquist opened this issue Apr 26, 2012 · 1 comment

Comments

@johnlindquist
Copy link
Contributor

See this gist:
https://gist.github.com/2503092

If you define a 'my-bind' attribute in the element, the error doesn't happen. It only appears when you do not add a 'my-bind' attribute.

@pkozlowski-opensource
Copy link
Member

Looks like it was also reported in #1435

lrlopez added a commit to lrlopez/angular.js that referenced this issue Jan 26, 2013
If you bind using '=' to a non-existant parent property, the compiler
will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception, which is right
because the model doesn't exist.

This enhancement allow to specify that a binding is optional so it
won't complain if the parent property is not defined. In order to mantain
backward compability, the new behaviour must be specified using '=?' instead
of '='. The local property will be undefined is these cases.

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

Successfully merging a pull request may close this issue.

3 participants