Can you just use conditional
templates<http://www.polymer-project.org/docs/polymer/binding-types.html#conditional-templates>for
this?

<template if="{{jsonObj.type == 'foo'}}">
  ...
</template>

<template if="{{jsonObj.type == 'bar'}}">
  ...
</template>


On Thu, May 15, 2014 at 7:00 AM, <[email protected]> wrote:

> Is there any way to set a template selection "ref" that can be chained to
> the default algorithm which selects by ref name?
>
> I typically bind to json data and wanted to have a template automatically
> selected based on a "type" field in my json object.
>
> I do not mind loading 10-15, relatively small templates up front for the
> different types of visual presentations for specific data objects in my
> webapp.
>
>  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/906b1429-ca0e-48cc-8d6e-602c1b7d1e8b%40googlegroups.com<https://groups.google.com/d/msgid/polymer-dev/906b1429-ca0e-48cc-8d6e-602c1b7d1e8b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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/CACGqRCAaoU2vGLAaP22V2ucpZtaG%3DH2b0595vBkuZ1HR9kzB5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to