The following syntax:

<template repeat="{{items}}">


works both in Polymer Elements and in the main document body (see how it 
works: http://jsfiddle.net/warpech/u59pk/2/ )

However, the following syntax ("named scope"):

<template repeat="{{item in items}}">


works only within a Polymer Element template (Polymer Element: 
http://jsfiddle.net/warpech/u59pk/3/ , body: 
http://jsfiddle.net/warpech/u59pk/6/ )

I assume this is because the expression "item in items" is only parsed by 
Polymer Expressions, but it took me some time to investigate.

I have few questions:
1. Is the "item in items" parsing done by 
https://github.com/Polymer/polymer-expressions/blob/master/third_party/esprima/esprima.js
 
? I suppose so
2. I there a way to make this expression parse outside of a 
<polymer-element>? I see a big benefit from using named scopes in my 
templates but I prefer not to wrap my whole app in a <polymer-element>
3. Template Binding page suggests "item in items" would be available in 
<template>, also outside <polymer-element> ( 
http://www.polymer-project.org/platform/template.html ). And I would love 
it to be so. However, on a page where Polymer Expressions ( 
http://www.polymer-project.org/platform/template.html ) are described, it 
is more clear that it only runs within <polymer-element>. Perhaps some 
clarification should be added there.

Thanks for your great work!

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/487303fc-de38-48e0-a0c0-7f31939901ae%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to