polymer-1.0

Missing <component>.html_script_0.js files in Polymer build using the CLI tool

£可爱£侵袭症+ 提交于 2019-12-11 01:40:36
问题 I'm having problems running the polymer build command of the polymer CLI, it gives me the following feedback: and neither of my built folders (bundled or unbundled) have the javascript files. The build process places <script> tag with the src of a javascript file in the place of my javascript code, but this files are not being generated. I don't know if both errors are related, but I don't know what can I do to generate the <component>.html_script_0.js files. 回答1: I had this same problem and

Fill page with iron-pages element

最后都变了- 提交于 2019-12-11 01:37:38
问题 I'm trying to fill the entire page with an iron-pages element. With the following code I trying to create a page that looks like the following: ------------------------------------- | Top | ------------------------------------- | Bottom | | | | | | | | | | | ------------------------------------- Code: <html> <head> <script src="bower_components/webcomponentsjs/webcomponents.js"></script> <link rel="import" href="bower_components/polymer/polymer.html"> <link rel="import" href="bower_components

Polymer: Reload Styles when loading dynamic content

℡╲_俬逩灬. 提交于 2019-12-11 01:35:12
问题 I'm including styles using <style include="style-name"></style> which generally works fine. However, I have one element which dynamically loads and changes its contents via JavaScript. It will at some point load new content from some external source and update its contents accordingly. Those new contents do not have the style from style-name applied to them. How do I get Polymer to reevaluate the styles and therefore also apply them to the new content? I'm using Meteor + Synthesis if that

How to work with app-localstorage-document in Polymer

好久不见. 提交于 2019-12-10 22:53:14
问题 I am trying to figure out how to set and retrieve a value in the app-localstorage-document. I worked before with the iron-meta element and did it like so: <iron-meta id="meta" key="id" value="{{meta}}"></iron-meta> Polymer({ is: 'login-form', properties: { meta: { type: String, value: '' }, }, getValue: function() { this.meta = '100' var savedValue = this.$.meta.byKey('id'); console.log(savedValue); } }); But when I try something similar with the app-localstorage-document it just returns:

Polymer 1.0 - Issue with displaying values inside template is=“dom-repeat”

无人久伴 提交于 2019-12-10 19:01:54
问题 While migrating to Polymer 1.0 from 0.5 I have come across an interesting thing. Thought it might help others having similar problem. I have an element where I am using <template is="dom-repeat" items="{{customers}}">...</template> . The problem I am facing is I have to place every single property binding inside a HTML element. The code below what I intended to write: <template is="dom-repeat" items="{{customers}}"> <div> {{item.name}}<br /> {{item.addr}}, {{item.addr2}}<br /> {{item.phone}}

Paper-fab partially hides behind app-toolbar

試著忘記壹切 提交于 2019-12-10 18:56:25
问题 I want to import an element that contains a paper-fab and have the paper-fab overlap the seam between the app-header element and the imported element. (In this case, I'm calling the imported element a fab-element ). In other words, I simply want the paper-fab to "float" (as advertised and like it's supposed to). What I expect it to look like: jsBin What it actually looks like: FAB inside app-toolbar . (works) Click here for jsBin. FAB outside app-toolbar but inside app-header . (works) Click

Why is my SVG rendered by D3 inside a Polymer component unstyled?

≡放荡痞女 提交于 2019-12-10 18:26:56
问题 Here is a Plunker sketch of my problem. The relevant code, containing the Polymer template and its invocation: <link rel="import" href="http://www.polymer-project.org/1.0/components/polymer/polymer.html"> <dom-module id="polymer-d3-component"> <template> <style> #monthChart .line { stroke: rgb(247, 150, 29); stroke-width: 2; fill: none; } #monthChart .axis { shape-rendering: crispEdges; } #monthChart .x.axis line { stroke: rgba(88, 89, 93, .12); } #monthChart .x.axis .minor { stroke-opacity:

typeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node Polymer

纵饮孤独 提交于 2019-12-10 16:59:35
问题 I am trying to implement context menu using polymer paper menu. Whenever I remove node from dom. polymer is throwing error like this typeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node' and I get the following error message: What shall I do? 回答1: I had the same issue. This is due to polymer-mini.html checks if the arg passed to document.documentElement.contains( node ) is node type. Debugging i could see that an event propagated so the last iteration was window

paper-menu-button's dropdown (paper-menu) not overlaying other iron-list items

落花浮王杯 提交于 2019-12-10 14:48:12
问题 I'm running into an issue using polymer 1.0's paper-menu-button . It's dropdown menu isn't overlaying neighbouring iron-list elements. I am building an element that displays items using iron-list , and each item has a dropdown menu of options that can be performed on that particular iron-list item. However, the paper-menu-button 's paper-menu dropdown is not appearing on top of neighbouring iron-list items, only on top of it's own list item. I've tried inspecting items in Chrome, and playing

Polymer 1.0.5: Select not working on paper-dropdown-menu

↘锁芯ラ 提交于 2019-12-10 12:15:38
问题 I can't seem to set a default selected option, if needed. Read the docs but no other properties, except for label works. <paper-dropdown-menu label="I Love:"> <paper-menu class="dropdown-content" selectedItem="Heroes Reborn"> <paper-item>Teen Wolf</paper-item> <paper-item>Heroes Reborn</paper-item> <paper-item>Once Upon a Time</paper-item> </paper-menu> </paper-dropdown-menu> No matter if I set a value on paper-item value="x" then <paper-menu selected="x"> nothing works. Do I need to run some