Why does Polymer eat my HTML tags?

Web components with Polymer rock! But sometimes debugging such JavaScript applications can be frustrating due to the lack of debug information.

A situation we frequently face: Everything works fine in the application. Until we add just one more component. Bang! Suddenly some completely unrelated HTML tags disappear. OK, therefore we have the Developer Tools. But uhh, no trace of the tags there as well.

Often this is caused by missing the closing tag of the Polymer component. In the following example the Polymer component will be visible but everything below will be gone.

<my-polymer-component>
I will be missing :(

Just add the missing closing tag, and all will be good again!

<my-polymer-component></my-polymer-component>
All good :)

So, when you face the next time missing content below a Polymer component: Check if your tags are correctly closed.

Want to learn more about Polymer? Have a look to all our Medium posts on Polymer.


Photo: Ionut-Cristian Florescu