-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can you show me a demo with parent path (../) ? #925
Comments
I alter some tag name in what i write to keep code, not formated! |
I'm not really sure exactly what your template is as it seems like it's missing things. Could you show an example of this failure using this template? |
Oh, sorry, this is the link: http://jsfiddle.net/24z4q3ra/2/, I want output list, but this will lead to an error. We can not see the error in jsfiddle.net page, but we can write a demo and see error in console window. the next link will out put right result : http://jsfiddle.net/2b7uye2p/, I just adjust the handlebars template orderinal. Why ? |
Ironically this is the exact same issue that my own team found yesterday. Fixed in #926. If you add a space or similar in one of the children (http://jsfiddle.net/24z4q3ra/3/) it should work until the fix for #926 is released. |
Thanks for providing the fiddle! |
It's a bug that is fixed in master but the workaround is in the link I posted in my last comment. |
I see document carefully on handlebars website(http://handlebarsjs.com/). Scroll to Handlebars Paths, The "../" means i can get a relative parent template scope, but the simplest demo can work well, not a little complicated. I tried write a data context like this:
And i want iterate output : story[i] / total for percentage. The template code like this:
When i put [part 1] before [part 2], then i get error: Uncaught TypeError: Cannot read property '1' of undefined ! Because the last args(depths) is undefined. And I try set [part 1] after [part 2], then it worked. I was so confused for parent path, and never see a perfect demo can explain this(../).
blocker "calc" is simple output, like:
The text was updated successfully, but these errors were encountered: