-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dom-if contents show regardless of whether condition is true or false #4643
Comments
Looks like if you pull out some of the spaces in your binding this issue does away: http://jsbin.com/qedapijulo/edit?html,output tldr; I DO feel like this has been addressed at some point in 1.x, but maybe there was a performance benefit that was found to rationalize adding back this strictness? |
Coming from Angular development I don’t expect this kind of behavior at all. I would assume that whitespace around parameters for readability is irrelevant, as it is in regular JavaScript. (On that note, I also expect to be able to do comparison directly in the |
There is a bug in the parsing code, will be fixed. |
Fix parsing for argument whitespace. Fixes #4643.
Live Demo
http://jsbin.com/quhezacofo/edit?html,output
Steps to Reproduce
dom-if
s in a template.dom-if
.dom-if
’sif
attribute to an expression that evaluates totrue
; the otherfalse
.Expected Results
Conditional loading of the different things.
Actual Results
Both things load every time.
Browsers Affected
Edge(not tested)IE 11(not tested)Versions
The text was updated successfully, but these errors were encountered: