Skip to content
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

TemplateBinding should warn/console log about using bind with references. #615

Closed
eseidel opened this issue Jul 9, 2014 · 8 comments
Closed
Assignees

Comments

@eseidel
Copy link

eseidel commented Jul 9, 2014

<template id="target" bind="{{ 'foo' as bar }}">{{ bar }}</template>
<template bind ref="target"></template>

Won't show foo. since bind= is ignored on the target template. You'll have to nest another template inside if you want your bind= to work.

eseidel pushed a commit to eseidel/cycletimes that referenced this issue Jul 9, 2014
@eseidel
Copy link
Author

eseidel commented Jul 9, 2014

Worked around in my project with eseidel/cycletimes@6919a9d

@arv
Copy link
Contributor

arv commented Jul 9, 2014

I'm not sure we can warn here. Conceptually it is valid. Your second template might have a model that has a bar property.

@eseidel
Copy link
Author

eseidel commented Jul 9, 2014

Can you give an example where the bind="{{ 'foo' as bar }}" is not ignored?

@arv
Copy link
Contributor

arv commented Jul 9, 2014

It would not be ignored when you stamp out #target

@arv
Copy link
Contributor

arv commented Jul 9, 2014

Keeping this open to see if we can think of when it would we guarantee to be correct to warn.

Another option might be to "inherit" the bind attribute value from the ref template.

@eseidel
Copy link
Author

eseidel commented Jul 9, 2014

Arv has convinced me in #polymer that it's arguably the responsibility of sorted-table to warn when it sees a bind= on my rowTemplate that it's not going to use it.

https://github.com/stevenrskelton/sortable-table

I doubt it's worth fixing in that case.

@eseidel eseidel closed this as completed Jul 9, 2014
@eseidel
Copy link
Author

eseidel commented Jul 9, 2014

Sorry, feel free to keep it open as you wish.

@eseidel eseidel reopened this Jul 9, 2014
@tjsavage
Copy link
Contributor

Looks like this is resolved! Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants