Created
January 10, 2012 16:55
-
-
Save joachimhs/1590003 to your computer and use it in GitHub Desktop.
ember.js metamorph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have the following template: | |
<script type="text/x-handlebars" data-template-name="header-template"> | |
<ul id="menu"> | |
{{#each KR.MenuItemController.content }} <li><a href="#">{{ menuName }}</a> | |
{{#if hasSubItems}} | |
<ul> | |
{{#each subItems}} | |
<li><a href="#" onclick='KR.MenuItemController.set("clickedItem", {{ menuAction}})'>{{ menuName }}</a></li> | |
{{/each}} | |
</ul> | |
{{/if}} | |
</li> | |
{{/each}} | |
<li class="end"> </li> | |
</ul> | |
</script> | |
And I want the link to read <a href="#" onclick="KR.MenuItemController.set('clickedItem', 'menuAction'>{{menuName}}</a> | |
But its written out with metamorphic scripts around the value. How can I format the {{bidnAttr }} so that it prints out the whole KR.MenuItemController.set... part ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment