Polymer - Meteor.js <core-menu> issue

78 views
Skip to first unread message

Jelena Jovanovic

unread,
Feb 20, 2015, 4:43:03 PM2/20/15
to polym...@googlegroups.com
Hey guys, me again, lol. :)
So, I am working on a project that is built with meteor.js and polymer. I have next code:
12345678910111213141516
<core-menu>
  {{#if addingCategory}}
  {{> addingCategoryTemplate}}
  {{/if}}
 
  <paper-item>
         {{#each categoriesList}}
         <div class="{{showIfCategorySelected name}}">
            ... the rest of the code ...
         </div>
  </paper-item>
 
  {{#if addingSubCategory name}}
  {{> addingSubCategoryTemplate}}
  {{/if}}
</core-menu>

I need <paper-item> to be repeated dynamically as you can see. But I get this error:

Unexpected HTML close tag ... </paper-item>

The only way it wanna work is when I place if handlebars before and after a <core-menu> like this:

{{#if addingCategory}}
{{> addingCategoryTemplate}}
{{/if}}
<core-menu>
  <paper-item>
         {{#each categoriesList}}
         <div class="{{showIfCategorySelected name}}">
            ... the rest of the code ...
         </div>
  </paper-item>
</core-menu>
{{#if addingSubCategory name}}
{{> addingSubCategoryTemplate}}
{{/if}}

 which is not what I need.
Does anyone knows why? It has to do something with shadow-root or you think that problem is something totally else?

Rob Dodson

unread,
Feb 20, 2015, 4:52:23 PM2/20/15
to Jelena Jovanovic, polymer-dev
Are you missing a closing {{/each}} ?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/d87e2ad7-ff17-45bc-969c-480b53b14161%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jelena Jovanovic

unread,
Feb 22, 2015, 11:30:01 AM2/22/15
to polym...@googlegroups.com, jelen...@gmail.com
Thanks Rob! That was silly. 

Rob Dodson

unread,
Feb 23, 2015, 1:43:48 PM2/23/15
to Jelena Jovanovic, polymer-dev
Reply all
Reply to author
Forward
0 new messages