googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 61 forks source link

[Expression Syntax] What should named scopes do when the scope *name* is bound to an input value #109

Closed rafaelw closed 10 years ago

rafaelw commented 11 years ago

i.e.

<template repeat="{{ user in users }}">
   <input value="{{ user }}">
</template>

Seems like the two choices are

1) Up the element position in the iterated Array. This seems scary, as it will destroy the instance and create a new one

2) Issue a warning.

arv commented 11 years ago

If you just think of the user then I think the behavior is that it should update the value in the collection but not recreate the instance. I'm not sure how can implement that though?

rafaelw commented 11 years ago

Angular can do (1). I'm worried about this, however. I'd like to see how often this comes up and if the workarounds aren't too horrible. Breaking the invariant that template's always create new instances for different model values seems dangerous to me.

rafaelw commented 10 years ago

Moved to: https://github.com/Polymer/polymer-expressions/issues/12