I am newbie in Polymer projects, I have installed polymer 2.0 starterkit, everything works fine except iron-icon. It doesn't display icon when i run project.
<!-- Load the Polymer.Element base class -->
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../bower_components/iron-icon/iron-icon.html">
<link rel="import" href="../bower_components/iron-iconset-svg/iron-iconset-svg.html">
<dom-module id="my-iconsset-view">
<!-- Defines the element's style and local DOM -->
<template>
<style>
:host {
display: block;
padding: 16px;
}
</style>
<h1>My Iconsc</h1>
<iron-icon icon="icon:menu"></iron-icon>
<iron-icon icon="input"></iron-icon>
</template>
<script>
// Your new element extends the Polymer.Element base class
class MyIconssetView extends Polymer.Element {
static get is() { return 'my-iconsset-view'; }
}
//Now, register your new custom element so the browser can use it
customElements.define(MyIconssetView.is, MyIconssetView);
</script>
</dom-module>
Import
<link rel="import" href="../bower_components/iron-icons/iron-icons.html">
instead of justiron-icon
.Also, you don't have to mention
icon="icon:menu"
, justicon="menu"
is fine, unless you have defined your owniconset
and named as 'icon'.