-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Names used by Object.prototype properties cannot be defined as isolate scope properties #9343
Comments
Thanks for the report! This looks like it should have a simple test case; could you create one on http://plnkr.co/ and check if the issue happens on the snapshot version as well? |
yes its probably the same issue because of how $bindings are constructed, i'll take a quick look |
Actually, I'm bumping the |
this doesn't look like it should affect the master branch, but lets test it and see |
It affects at least |
yeah this does seem to be broken in snapshot... looking into it |
Im away from keyboard right now. I'll provide the demo as soon as I get back to work later today. |
I see the problem, will have a patch shortly |
Prevent accidentally treating a builtin function from Object.prototype as the binding object, and thus preventing the compiler from throwing when using attribute binding names which match a property of the Object prototype. Closes angular#9343
no need for a demo, patch is up. now we wait for review |
I run into an issue after defining a directive like this:
The top of the trace was:
After I changed the name of the scope attribute into something else (like
check
) the issue was gone.While researching the issue my teammate run into #8068 there the problem with
watch
as a get parameter was described and fixed.I did check Firefox-only
Object.prototype
properties:toSource
watch
unwatch
and they all make Firefox break, but not Chrome.
I checked some other
Object.prototype
properties:valueOf
toString
those break in both Firefox and Chrome.
Changing the binding policy from
@
to=
does not cause an error.Changing the binding policy from
@
to&
does not cause an error.The text was updated successfully, but these errors were encountered: