问题
Using handlebars-1.1.2 and old emberjs 1.5.1.
I just need to put one variable in label's "for":
<label for='{{queue.id}}'>
Instead
<label for="6">
i get
<label for="<script id=" metamorph-51-start'="" type="text/x-placeholder">6<script id="metamorph-51-end" type="text/x-placeholder"></script>'><script id="metamorph-52-start" type="text/x-placeholder"></script>Очередь через личный кабинет<script id="metamorph-52-end" type="text/x-placeholder"></script></label>
If i simply use {{queue.id}} inside the template it works okay.
How can I pass that value inside html attribute?
回答1:
In this version of emberjs I should write
<label {{bind-attr for=queue.id}}>
来源:https://stackoverflow.com/questions/35728305/handle-scope-variables-with-handlebars