Template Not ignoring code within html comment #2443
Unanswered
vvaradarajan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Briefly (?): The render attempts to evaluate code within html comment block and errors out if the code is not valid. It should not evaluate code within comment blocks.
ex:
myTemplate = html <backtick>... <!-- Events below this are sent to SideSim, so that is bound as 'this' <div style="flexlayout" @click="${this.sc.controlDisplay.bind(this.sc)}"> <label><input type="checkbox" name="mainControls"/>Hide Main</label> <label><input type="checkbox" name="sideControls" checked>Hide side</label><br> </div> --> ...
The templating engine attempts to evaluate the @click block, even though it is commented out by the html block comments. This is slightly in-convenient during development as comment blocks hold different alternatives while working in html.
(Note: Unfortunately, it appear that code block not showing line-breaks. Also is used to represent ` )
Beta Was this translation helpful? Give feedback.
All reactions