-
Notifications
You must be signed in to change notification settings - Fork 27.5k
strictBindingsCheck throw a error for a optional attribute #16303
Comments
As documented, "if the binding expression is non-assignable, or if the attribute isn't optional and doesn't exist, an exception ( The same behavior applies to older versions, up to (and including) 1.3.x. Early on the 1.4.x release cycle, it was broken, which was reported as a regression in #13367 and fixed for 1.4.9 in #13373. So, the behavior you see on 1.6.6 is the correct one and is the same you would see with the latest 1.4.x version as well. (I know that such long-standing regressions (remaining in the source code for 9 patch releases) can lead to confusing situations where people start relying on them, but it was clearly a bug, the correct behavior is documented and it should at least be straight forward to fix in your apps.) |
To clarify, $compile:nonassign is not related to $compileProvider.strictComponentBindingsEnabled. It's a different error that is thrown under other circumstances. |
I'm submitting a ...
Current behavior:
When update angular from v1.4.8 to v1.6.6, a error thrown:
"[$compile:nonassign] Expression 'undefined' in attribute 'elementId' used with directive 'tiActionMenu' is non-assignable!"
I check the html, there is no elementId attribute in '<ti-action-menu></ti-action-menu>, but the strictComponentBindings is not enabled.
Expected / new behavior:
No error thrown.
Minimal reproduction of the problem with instructions:
AngularJS version: 1.x.y
1.6.6
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
chrome 62
Anything else:
The text was updated successfully, but these errors were encountered: