polymer

Integrate JasperReports Viewer Like Component inside an AngularJs Component

女生的网名这么多〃 提交于 2020-03-05 07:03:27
问题 I have been researching this problem for some time and have seen few references (like this). I know the Viewer is a Swing component, but I would like to achieve something like integrating/having a container in which to preview reports. I have not seen any such component default provided by Angular. Has anyone attempted something similar or is it better to create own web components (Polymer-wise perhaps). Thanks in advance. 回答1: Probably this is not really possible, due to reasons above. Just

Character escaping in Polymer

独自空忆成欢 提交于 2020-02-08 09:13:09
问题 I'm creating a component with Polymer which has a background image added with inline styles. The problem is that using double brackets inside parenthesis and quotes makes the {{imageurl}} act like a string. Any tips? <div class="image-container" style="background-image: url( '{{imageurl}}' )"> Update: I've tried the method posted here with no luck. 回答1: What you will have to do is have a computed property that returns the style: <div style$="{{divStyle}}">hi</div> Note the use of $= here as

Programmatically create special Polymer-Element

泄露秘密 提交于 2020-02-02 07:14:05
问题 I have got a polymer-element with following html: <polymer-element name="tab-bar"> <template> <button>Hello</button> <template repeat="{{item in items}}"> <div>This element is {{ item }}</div> </template> </template> <script type="application/dart" src="tab_bar.dart"></script> </polymer-element> The underlying dart class looks as follows: import 'package:polymer/polymer.dart'; @CustomTag('tab-bar') class TabBar extends PolymerElement { List items; TabBar(List<String> items) { this.items =

Light DOM styles “leaking” into Polymer component's shadow DOM

妖精的绣舞 提交于 2020-01-30 12:17:04
问题 I have a polymer web component which has a div named content, within the component. I have noticed that if the host page has a style for div.content then it applies that style to my component! This is an unexpected turn of events since web components are supposed to prevent light DOM styling from leaking into the component. In addition, I am using the following css rule which is supposed to prevent such a thing from happening: :host { all: initial; } Any ideas? 回答1: Polymer by default doesn't

Polymer + Firebase (Polymerfire): Cannot read property 'push' of undefined': 'this.$.query.ref.push(…)'

孤街浪徒 提交于 2020-01-28 10:15:25
问题 I'm following a Polymer + Firebase tutorial video using the Polymer App Tool Kit (initiated with the polymer CLI). When I try to push data to a Firebase collection, I get the following error: Cannot read property 'push' of undefined' Here's my code (firebase app is initiated in my-app.html with name "firebase-app"): <dom-module id="add-model"> <!-- Defines the element's style and local DOM --> <template> <firebase-auth user="{{user}}" app-name="firebase-app"></firebase-auth> <firebase-query

Polymer + Firebase (Polymerfire): Cannot read property 'push' of undefined': 'this.$.query.ref.push(…)'

[亡魂溺海] 提交于 2020-01-28 10:14:11
问题 I'm following a Polymer + Firebase tutorial video using the Polymer App Tool Kit (initiated with the polymer CLI). When I try to push data to a Firebase collection, I get the following error: Cannot read property 'push' of undefined' Here's my code (firebase app is initiated in my-app.html with name "firebase-app"): <dom-module id="add-model"> <!-- Defines the element's style and local DOM --> <template> <firebase-auth user="{{user}}" app-name="firebase-app"></firebase-auth> <firebase-query

Popover component hiding behind the table cells of Iron data table in polymer

为君一笑 提交于 2020-01-25 23:46:09
问题 popover overriding Date picker overriding 回答1: Well, bad news is that it's iron-list issue (namely iron-list using z-translation ). Good news is that there is kind of a workaround for that... I had the same problem and what I ended up with was a behavior (but you can make put this in your component) that has something like: tableListOverflowVisible: function (...tables) { tables.forEach((id) => { if (typeof id !== 'string') { return; } const table = this.$[id]; if (!table) { return; } Polymer

How to re run dom-repeat with sort when bool property changed in Polymer element

霸气de小男生 提交于 2020-01-25 18:25:30
问题 How can I rerun sort and render element when something changed in my element or whenever I want from code or automatically? Thank you <template is="dom-repeat" items="[[attachments]]" as="attach_item" sort="_sortItems"></template> 回答1: You need to set an observer for the fields you want to watch. Quoted from polymer docs: By default, the filter and sort functions only run when the array itself is mutated (for example, by adding or removing items). To re-run the filter or sort functions when

Error in console while hiding the link on click through Polymer/Dom

主宰稳场 提交于 2020-01-25 01:22:10
问题 Hi Stack Overflowians, I want to hide the Click foo link when I click the same Click foo link. I have the following code: <dom-module> <div id="foo"> <a href="#" onclick="toggle_visibility('foo');">Click foo</a> </div> <script> Polymer({ is: 'test-file', toggle_visibility: function(id) { var e = document.getElementById(id); if (e.style.display === "none") { e.style.display = "block"; } else { e.style.display = "none"; } }); </script> </dom-module> I get the error in Console tab when I click

Shadow DOM CSS Styling from outside is not working in Google Chrome

北慕城南 提交于 2020-01-24 08:53:46
问题 I am using polymer 's paper-action-dialog and paper-button in my web page. There are two paper-buttons in a paper-action-dialog. I want to style those paper-buttons from outside (main html). I have written CSS styles in shadow DOM notation. These styles are working fine in Firefox browser but not behaving correctly in Google-chrome browser. What should I do in order to get that work in chrome.? Mark up <paper-action-dialog class="ask" backdrop autoCloseDisabled=true heading="Heading!"> <p