polymer

Bindings when elements are bound to same object in memory

我怕爱的太早我们不能终老 提交于 2019-12-11 12:12:51
问题 I have a situation where I have multiple elements which are bound to the same path and thus the same JS object underneath. Because of this, changes to the object at one place are immediately visible by the other element (though it doesn't know it). The documentation says I need to manually alert the system about this or use a automatic binding, which I am. So a notifyPath call is happening. In the notifyPath DOM traversal it eventually nears the element which should react to the change,

Polymer V.1 how to concatenate some text to iron-list item that has json data e.g text{{data.somedata}}text

房东的猫 提交于 2019-12-11 12:11:04
问题 I'm Using iron-ajax with iron-list and for the iron-image i need to concatenate text to the image source that has {{item.path}} i tried this way <iron-image style="width:80px; height:80px;" sizing="cover" src="http://mydomain/{{item.path}}.jpg" preload></iron-image> But i get no image loaded and upon inspecting a list item it doesn't insert the path of the image coming from json data. src="http://mydomain/{{item.path}}.jpg" What is the way to concatenate the above by itself src="{{item.path}}

iron-ajax not working with local json file?

你。 提交于 2019-12-11 11:57:35
问题 In my polymer app, pulling in json data via iron-ajax element works fine, but I can't get it to work with my local json file. I've hosted the app on firebase, but still no luck. This doesn't work: <iron-ajax auto url="data/watchlist.json" last-response="{{data}}" handle-as="json"> </iron-ajax> But, this does works: <iron-ajax auto url="http://jsonplaceholder.typicode.com/albums/" last-response="{{data}}" handle-as="json"> </iron-ajax> What am I doing wrong? Can't tell if I'm doing something

The paper-header-panel or the paper-drawer-panel won't take the whole top edges of the browser window

风格不统一 提交于 2019-12-11 11:55:54
问题 Hello I am studying Google's Polymer I followed their guide about Responsive Material Design Layouts But I just noticed that the paper-drawer-panel won't take the whole edge of the top part of the browser window. It has a bit of a gap. Here's my code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Layout</title> <script src="bower_components

Trying to use custom element, “You tried to use polymer without loading it first”, it's definitely imported

痞子三分冷 提交于 2019-12-11 11:44:50
问题 I've been trying to use a custom element for a paper-dialog popup that I want to use. If I set up a test page within the file the custom element is defined in, using all the same imports as my index, it works. If I import the custom element into any other page, it no longer works. Even if I load the test file that does work into a div on another page, it gives me the error Uncaught Error: You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components

All URL are pointing to root instead we need a project folder

扶醉桌前 提交于 2019-12-11 11:41:59
问题 I am new to node and gulp I create a project and its working fine but I am facing an issue when i am hosting my project on some web server (tomcat). All URL are pointing to root instead we need a project folder Please guide me what i am missing currently : http://localhost:8000/ I need something like this : http://localhost:8000/projectName/ 回答1: I've done this on applications where I have one application that essentially builds another application. They are tightly coupled in my case so I

PHP not receiving POST body set in Polymer core-ajax element

99封情书 提交于 2019-12-11 11:41:03
问题 I've created a Polymer element using core-ajax to send data via POST to a PHP script. <polymer-element name="login-process"> <template> <core-ajax auto method="POST" id="login" url="/login.php" response="{{response}}"> </core-ajax> <button on-tap={{doSend}}>send</button> </template> <script> Polymer('login-process', { ready: function() { }, doSend: function() { this.$.login.body = '{"foo": 1, "bar": 2}'; this.$.login.go(); }, responseChanged: function(oldValue) { console.log(oldValue);

IntelliJ suddenly returning 403s and 404s for Dart web app

六月ゝ 毕业季﹏ 提交于 2019-12-11 11:22:01
问题 I'm developing a Dart client-side application using IntelliJ IDEA 13. Yesterday, I upgraded my Polymer.dart to 0.10.0-pre.2. Since then, things have been kind of screwy. I've downgraded by to 0.9.5, as I don't need to new features any more, but I keep hitting this same problem. When I launch my app in Dartium from IntelliJ, I get the following errors: GET http://localhost:63342/webatara/web/packages/observe/src/bindable.dart 404 (Not Found) An error occurred loading file: package:observe/src

Construction and ordering of nested and template if= style polymer dart elements?

老子叫甜甜 提交于 2019-12-11 11:09:48
问题 Code for a very small app illustrating these multiple constructor calls is now up on GitHub at https://github.com/Chiba-City/testnest. I am trying to figure out why a polymer element would be constructed twice and what determines the order of construction of polymer elements that contain other polymer elements and why is a "templated out" element using an "if" template constructed at all. Also, if one cannot reproduce these results with three simple polymer elements, one defined to contain or

How to Handle Input with Polymer, without blue border tab focus?

蹲街弑〆低调 提交于 2019-12-11 11:07:21
问题 Edit 2 : Keypress events working, on this jsbin: http://jsbin.com/foyile/1/. The problem is, I need to focus the tab on the element, with these two pieces line of code ready: function() { this.tabIndex = 0; this.focus(); } The problem is this causes to draw a blue border around the element, and it gets ugly when I do this on my moving element, Is there a way to capture the key event globally on the page without focusing on the element, (or a parent element that will make the border invisible