I'm building a a SPA with polymer that contains multiple pages, each page 
may consist of a large number of controls.  I've was using the core-pages 
control for this (as recommended: 
https://github.com/ebidel/polymer-change/blob/master/demos/spa.html) but 
I'm aware that the DOM tree may become quite large.  So instead I started 
to write my own polymer tab control that removes the non-visible pages from 
the DOM and switches the pages in/out when necessary.  

My control can be defined something like this:

<tab-control>
            <page-one Title="Page One"></page-one>
    <page-two Title="Page Two"></page-two>
</tab-control>

To acheive the desired result my element's script removes the pages from 
the light DOM and inserts only the selected page into the shadow DOM upon 
selection change of some paper-tabs.  However, when I do this the 
databinding in the child page does not work.

Questions:
1. Can the databinding work in this scenario, is there something I can do 
to kick it into life again?
2. Is this a valid approach when creating a SPA and trying to reduce the 
overall DOM size and if not can someone point me to a better pattern?

Many thanks!

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/fa387242-e47c-4304-ae29-30819733a404%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to