Polymer hides the drawer on large screens

This is my third question this week about the Polymer SDK, I am very sorry about that. Basically I'm trying to hide the item drawer <paper-drawer-panel>

on the big screen so that it looks like a mobile version, with this nice hamburger menu I've coded with the component <paper-icon-button>

.

In the official directory, I found an attribute forceNarrow

that I followed in the following way.

<paper-drawer-panel forceNarrow>

      

But it doesn't affect my actual big screen website.

+3


source to share


1 answer


The problem is that the new property mapping attribute in Polymer 1.0 can be a little confusing.

You really need to use an attribute force-narrow

in HTML that maps to a property forceNarrow

in JS.



<paper-drawer-panel force-narrow>

      

See https://www.polymer-project.org/1.0/docs/devguide/properties.html#property-name-mapping

+12


source







All Articles