PolymerElements / iron-iconset-svg

Represents a source of icons expressed as a collection of inline SVGs
https://www.webcomponents.org/element/PolymerElements/iron-iconset-svg
37 stars 34 forks source link

custom icons not working in polymer 2 #69

Closed esd100 closed 7 years ago

esd100 commented 7 years ago

Description

Polymer 2 migration is so frustrating! My custom icons were working in polymer 1 and now they are not working in polymer 2

          <paper-icon-item name="home">
            <iron-icon icon="appIcons:home" slot="item-icon"></iron-icon><a href="/home" link>Home</a>
          </paper-icon-item>

and

            <paper-icon-button icon="appIcons:menu" drawer-toggle></paper-icon-button>
esd100 commented 7 years ago

Anybody working on Polymer able to help with this issue?

TrentBrown commented 7 years ago

Oh, man. I thought I'd done something wrong, but it looks like it's not just me. Moved to 2.0.0 components from one-oh-something, and my icons disappeared. Been spinning my wheels for several hours already. I feel better knowing that I'm not suffering alone, but I want the pain to go away. No workaround for this?

btelles commented 7 years ago

Had a similar issue and it turned out to be the following:

"iron-meta" (the singleton pattern that iron-iconset-svg uses to manage all known iconsets) wasn't automatically updated in my list of dependencies when I updated the app. This failed silently, and I had to dig around to find out that iron-meta was still on version 1.x.

Adding the following to my bower.json (or corresponding dependency manager) file then running bower update fixed the problem for me.

    "iron-meta": "PolymerElements/iron-meta#^2.0.0",
esd100 commented 7 years ago

@btelles Thanks so much for figuring this out! That fixed it!

tanin47 commented 6 years ago

Upgrading iron-meta explicitly solves the issue with non-showing icons for me as well.

vishnuprasadps commented 6 years ago

@btelles @tanin47 Thanks.. Its solved my problem.. ! I just upgraded iron-meta @esd100 Thanks for the helpful question...

piot commented 6 years ago

This fixed the missing icon for me as well. Thanks!

mastercodekw commented 6 years ago

This fixed the icon-disappearing issue for me as well. The issue should be closed.

nuriaruiz commented 6 years ago

In my case, I installed iron-iconset-svg 2.1.1 last week, and it seems that the installation installed the wrong iron-meta because I could not see the icon until I explicitly added iron-meta 2.0.0 to my dependencies following your instructions