Open nicholaswmin opened 7 years ago
+1 for this! Btw, I found this related blog post: http://nader.tn/2015/07/polymer-element-recreation/
+1 Missing this feature very much. Btw, I found this https://github.com/TimvdLippe/iron-lazy-pages built on top of iron-pages Why cant the same be implemented in iron-pages?
I have just pushed support for dom-if
in iron-lazy-pages
. The implementation is rather naive: just mimic the if
property to the selected/deselected to trigger the dom-if
restamping. Check it out at https://github.com/TimvdLippe/iron-lazy-pages/pull/56
Do like this Do not forget to put the "div" because iron-page needs that to manage and create equal fonction in your script like this
As it is right now,
iron-pages
doesn't provide for a way to destroy non-currently viewed pages and restamp them when they come back into view.Providing a property that does this (perhaps
restamp
), would allow for significant performance improvements when navigating through complex DOM chunks with multiple levels of nested iron-pages.There's potential hacks around this using
<dom-if>
but they don't really scale well for many subpages and they result in convoluted markup, see this S.O question