Omkommersind
Omkommersind

Reputation: 295

Handle scope variables with handlebars

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>'&gt;<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?

Upvotes: 1

Views: 88

Answers (1)

Omkommersind
Omkommersind

Reputation: 295

In this version of emberjs I should write

<label {{bind-attr for=queue.id}}>

Upvotes: 0

Related Questions