We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue goes back as far as 1.1.6—and possibly farther—and still exists in 2.0-pre.
var context = {state:"bar"};
This should work in my eyes, however it renders "prefix-__!!__":
"prefix-__!!__"
<div class="foo {{#if state}}prefix-{{state}}{{/if}}"></div>
Here are some failed variations that I tried:
<div class="foo {{#if state}}prefix-{{.}}{{/if}}"></div> <div class="foo {{#if state}}prefix-{{../state}}{{/if}}"></div>
This works fine, but I'd like to use {{#if}}:
{{#if}}
<div class="foo {{#state}}prefix-{{.}}{{/state}}"></div>
This sort of works, but it's possible to produce "prefix-":
<div class="foo prefix-{{state}}"></div>
JSFiddle: http://jsfiddle.net/prometh/q6EPZ/
The text was updated successfully, but these errors were encountered:
What browsers are you having issue with when it comes to
<div class="foo {{#if state}}prefix-{{state}}{{/if}}"></div> <div class="foo {{#if state}}prefix-{{.}}{{/if}}"></div>
Because I am not seeing your !! issue with 2.0.0, proper. That said, maybe I'm not understanding Handlebars properly, but
{ state: "foo" }
with
<div class="foo {{#if state}}prefix-{{../state}}{{/if}}"></div>
doesn't seem like it should work at all, because it would be an explicit reference to the parent scope, which is non-existent.
Sorry, something went wrong.
Safari 6.0.5
And the ../ one was just a test to help find the source of the issue.
../
Do you still see the issue in this fiddle? http://jsfiddle.net/8qrKd/
Yes, sorry for the confusion. Long story short, ignore this bug report. Thank you for looking into this.
No branches or pull requests
This issue goes back as far as 1.1.6—and possibly farther—and still exists in 2.0-pre.
Context Data
var context = {state:"bar"};
Ideal Approach
This should work in my eyes, however it renders
"prefix-__!!__"
:Here are some failed variations that I tried:
Unideal Approaches (that do work)
This works fine, but I'd like to use
{{#if}}
:This sort of works, but it's possible to produce "prefix-":
It works fine using Handlebars.js
JSFiddle: http://jsfiddle.net/prometh/q6EPZ/
The text was updated successfully, but these errors were encountered: