Tools: Lazy loading dependencies not loaded correctly

Created on 20 Jun 2016  路  5Comments  路  Source: Polymer/tools

Polymer: 0.11.1
Node: 5.5.0
Operating System: Windows 10

How to reproduce:
1) run polymer init and select the app-layout with "app-drawer-template" (prpl pattern loading)
2) bower install the paper button with : bower install --save PolymerElements/paper-button
3) To the src/my-view1.html file, add an import to paper-button

and the add the button with the raised attribute:

Hello

4) polymer serve --open

Expected result:
When my-view1 is lazy loaded with importHref, it also loads it麓s dependencie (paper-button) and the button is showed with the raised css, elevating it from the page

Actual result:
The button is flat, no elevation, as if the css is not available to it.

This is not just paper-button, i tried with paper-fab resulting in the same behavior.
Im guessing this is a bug (if it is, and not just my error (or the other guy i found that had the same problem on the slack channel)) in the importHref and not the cli, but was not sure where to file that.

The general feeling is that the dependencies are not loaded fully or in time for the polymer controls to be loaded correctly.

cli Completed Bug

Most helpful comment

I believe this is dupe of #249 and the root cause is https://github.com/Polymer/polymer/issues/3705. One of workarounds is manually calling Polymer.updateStyles() after imported.

All 5 comments

I believe this is dupe of #249 and the root cause is https://github.com/Polymer/polymer/issues/3705. One of workarounds is manually calling Polymer.updateStyles() after imported.

Ah ok, thank you, was unaware of this

This workaround works even better if you call it on the attached event from the lazyloaded component

Thank you for opening. this is currently being tracked in the polymer repo issue linked above. I'll leave this open for a little while longer for anyone who runs into the same issue while using the CLI.

I am nearly certain that Polymer 1.6.0 fixes this, and therefore this should be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stramel picture stramel  路  4Comments

ronnyroeller picture ronnyroeller  路  4Comments

web-padawan picture web-padawan  路  4Comments

rwatts3 picture rwatts3  路  3Comments

NeoLegends picture NeoLegends  路  3Comments