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
forced lower case in binding declarations means <h1 [innerHTML]="title"> won't work #4368
Comments
@wardbell there is a special syntax for this already:
|
Oooo. I was about to change this to "textContent" which is safer but your comment makes a much more interesting observation so I reverted. We HAVE to document this!!! |
@wardbell totally!!!! There are probably other "goodies" in the compiler that are not well known. Ping me on slack so we can discuss those |
@pkozlowski-opensource we can't allow this with new compiler. It may work at build time, bit it would fail in the browser always. So for the sake of consistence we have to honor the browser. |
@mhevery oh, I was under the impression that we are going to use the same text-based compiler in both build-based compilation and in a browser. What is the advantage of having 2 different code paths in the compiler? I was assuming that we are always getting text of a template and not DOM tree so could use the same code.... |
Sorry closed by accident. I was not aware that we are not going to use the browser parser. @tbosch can you comment? |
I think we should do #4417 which would then solve all of these issues once and for good. |
Fixed by a8edc1e |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Yes, I know this is issue #1447 again.
That issue is closed ... as if closing it solved the problem. Well this is ANOTHER example of the problem and it means that we can't write simple binding declarations that touch existing DOM properties that happen to be mixed case (and there are a ton of them). We'll be force to write directives when we shouldn't have to do that.
This example expression
<h1 [innerHTML]="title">
throws the error:I feel we ought to be able to do something about this. Perhaps some kind of special syntax to indicate upper case?
<h1 [inner^html^]="title">
? We need some creativity here.The text was updated successfully, but these errors were encountered: