polymer-1.0

Tap listener for polymer iron-list item?

╄→гoц情女王★ 提交于 2019-12-10 10:57:32
问题 I have a custom element that utilizes iron-list to display an array of objects. Each item is generated via a template as follows: <iron-list id="projectList" items="[[projects]]" indexAs="_id" as="projLI" class="layout flex"> <template> <div> <paper-material id="itemShadow" animated elevation="1"> <div class="item layout horizontal" onmouseover="hoverOver(this)" onmouseout="hoverOut(this)"> <!-- I use a paper-menu-button to display a list of available actions here --> <!-- list item object

Is there an equivelent to the “polymer-ready” event in Polymer 1.0?

孤街浪徒 提交于 2019-12-10 10:38:24
问题 I need to know when I can begin using my custom Polymer elements programmatically. The elements are still undefined even in my window.onload handler. Is there an established way of doing this correctly with Polymer 1.0? -Edit- I see there is a downvote, so let me clarify the issue. I have the following custom element definition: <link rel="import" href="../../bower_components/polymer/polymer.html"> <dom-module id="element-one"> <style> :host { display: block; background-color: blue; } </style

Sending form with POST method and Polymer iron-form?

◇◆丶佛笑我妖孽 提交于 2019-12-10 09:56:18
问题 i use Polymer starter kit 1.0.2 and i'm trying to use iron-form based on (little) documentation i found. My method form is "post" and contain only one input. My form "action" is a PHP script (add.php) showing content of $_GET and $_POST: print_r($_POST); print_r($_GET); My form component (form_eclp.html) is: <dom-module id="my-form"> <template> <div class="horizontal center-center layout"> <div> <div class="horizontal-section"> <form is="iron-form" id="formGet" method="post" action="add.php">

Where to download all polymer elements as zip file?

时光毁灭记忆、已成空白 提交于 2019-12-10 03:58:01
问题 Polymer 1.0 is released recently and I can download the elements à la carte at the elements.polymer-project.org site, but I can't find an easy link to download everything in one big zip file? Any idea where they are hiding it? 回答1: You can download the Polymer Starter Kit for beginners that includes almost all the elements. And download the missing elements as a ZIP file as suggested here. Missing elements: Google Web Components Gold Elements 回答2: If you are using bower run these commands:

Polymer 1.0: Does <iron-meta> support binding to dynamic variables?

倖福魔咒の 提交于 2019-12-10 03:41:58
问题 I can get my <iron-meta> instance to work properly when using a static value. But when I bind the value to a dynamic variable (using {{}} ) it <iron-meta> no longer behaves as expected. Does <iron-meta> support binding its value to dynamic variables? <iron-meta id="meta" key="info" value="foo/bar"></iron-meta> // works <iron-meta id="meta" key="info" value="{{str}}"></iron-meta> // fails Previous work This question is a refinement of this question in order to clarify that the ONLY thing

Polymer back button doesn't work with hash routing

爷,独闯天下 提交于 2019-12-08 14:50:33
问题 Sup! Back button sometimes doesn't work with my polymer project. When i hit back button the page variable is steel the current page and i need to hit the button twice or three times to get it working for example i go to the /#/rules page from /#/home but it doesn't go back to /#/home once i press the back button the second or third time by the way it does go back to the main page. Here is my observer and router: properties: { page: { type: String, reflectToAttribute: true, observer: '

<neon-animated-pages> does not work with <paper-tabs>?

旧时模样 提交于 2019-12-08 04:26:21
问题 Question It is not possible to use <paper-tabs> inside a custom element to [[select]] <neon-animated-pages> right now. Correct? The comment by @FelixEdlemann: But I still didn't find a solution for using neon-animated-pages in combination with paper-tabs. on this Youtube video by @RobDodson seems to support my experience that using <paper-tabs> (inside a custom element) breaks <neon-animated-pages> right now. Please provide working example. If I'm wrong. And if it is possible to use <paper

Polymer 1.0 paper-submenu(s) inside paper-menu

耗尽温柔 提交于 2019-12-07 20:52:09
问题 Then I select an item in my outer paper-menu and after that I navigate into my submenu and select an item there, the outer-item is still selected. also conversely: <paper-menu class="list" attr-for-selected="data-route" selected="[[route]]" selectable="a"> <a data-route="one" href="{{baseUrl}}"> <iron-icon icon="home"></iron-icon> <span>one</span> </a> <paper-submenu> <paper-item class="menu-trigger">two</paper-item> <paper-menu class="menu-content"> <a data-route="two-1" href="{{baseUrl}}two

Dynamically inject shared styles in polymer element (polymer 1.2.3)

你说的曾经没有我的故事 提交于 2019-12-07 12:57:22
问题 I do have several nested polymer elements created by myself. Currently with using polymers shared styles I'm able to inject custom styling into other elements. Unfortunately this approach is restricted to static use. So at implementation time I do need to know which Element should use which shared style by import the shared style module with <link rel="import" href="my-shared-style.html"> and <style include="my-shared-style"></style> . But in my use case I do need to inject shared styles into

How do you nest two of Polymer's firebase-collection elements inside dom-repeat?

坚强是说给别人听的谎言 提交于 2019-12-07 06:33:07
问题 I have a problem of looping two of Polymers firebase-collection elements. With my database structure i first have to check which events the user has access to, then get the information on that event from events. The problem with this code is that when i loop the second firebase-collection the data-binding on "events" will be the same on all that repeats and therefore it will be the same name on every h4. So is there a way of having a unique variable in data="{{ }}". or is there a better way