polymer-1.0

Polymer paper-menu with Angular2

依然范特西╮ 提交于 2019-12-04 05:20:01
问题 I'm trying to user Polymer v1.0 elements with Angular2 beta3 and I'm having issues. Some elements work fine, such as input boxes. However, when I try and use paper-menu or paper-dropdown-menu it doesn't work. How can I get this plnkr to work? http://plnkr.co/edit/2n7xWH0MViPtO8AwZwq2?p=preview <!DOCTYPE html> <html> <head> <title>Angular 2 QuickStart</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://cdn.rawgit.com/download/polymer-cdn/1.1.4/lib

Polymer: manually submitting a form

拟墨画扇 提交于 2019-12-04 03:24:07
问题 In polymer I'm trying to manually submit a form. My form looks like this: <form id="myForm" on-submit="{{ submitForm }}"> <input class="text" value="{{ someValue}}"> <button type="submit">Submit</button> </form> And in the polymer object I have: submitForm: function(e) { e.preventDefault(); } Whenever I try to do the following: document.getElementById('myForm').submit(); the form totally ignores the on-submit attribute and posts the form to a new page. I'm building a on-screen keyboard for

Can't find Python executable “/path/to/executable/python2.7”, you can set the PYTHON env variable

匆匆过客 提交于 2019-12-04 02:59:33
bufferutil@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil > node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable . gyp ERR! stack at failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:78:16) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which

How to use Angular2 ngModel for Polymer paper-input? ERROR: No value accessor for '' [duplicate]

北战南征 提交于 2019-12-04 02:31:41
问题 This question already has answers here : Two-way binding in Angular 2 with NgModel and mutating bound property? (2 answers) Closed 3 years ago . This is my first question, I'm using angular2.beta.8, polymer 1.0, typescript. I'm having a problem when I use ngModel data binding with polymer paper-input element Basically nothing more than an element with ngModel and variable in the class. Running that creates this error: No value accessor for '' I started to use polymers with angular 2 just

How to solve No 'Access-Control-Allow-Origin' in polymer-project?

我们两清 提交于 2019-12-03 20:40:45
问题 Now I exploring Polymer-project 1.0 and the task is to get the JSON and print output repeatedly. But no matter what i tried below error is coming, even i tried with Github pages also gives me same error response in terminal Error XMLHttpRequest cannot load https://ajax.googleapis.com/ajax/services/search/news?v=1.0&rsz=8&pz=1&cf=all&ned=in&hl=en&topic=tc. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://rajasimon.github.io' is therefore not allowed

MouseEvent.path equivalent in Firefox & Safari

守給你的承諾、 提交于 2019-12-03 15:48:23
问题 I'm using Polymer 1.0 and when there is a click on a button in Chrome a MouseEvent is generated. This MouseEvent object has a path property which is an ordered array of parent elements to the clicked button. In Firefox & Safari, however, a click is generated which does not have a path property. Is there an equivalent property of the click object which gives me the same information? 回答1: It's not available, but if you really would like to have this property, then you could extend the native

Hero Animation in polymer 1.0

♀尐吖头ヾ 提交于 2019-12-03 15:46:04
I am trying to implement hero animation(from neon-elements) to animate to another custom element(element1.html to element2.html) by clicking a red square. I wrote everything that is documented here: https://github.com/PolymerElements/neon-animation#shared-element But nothing happens on click. Please guide me on implementing this. Here are my files: index.html <!DOCTYPE html> <html> <head> <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"> </script> <link rel="import" href="bower_components/neon-animation/neon-animated-pages.html"> <link rel="import" href="bower

How to filter an iron-list in polymer 1.0?

北城以北 提交于 2019-12-03 13:33:28
The dom-repeat element offers a filter attribute. Is there a similar way to filter with iron-list ? For example: Given a list of people, I want to filter the ones born in a specific city. daluege As iron-list unfortunately doesn't offer a filter attribute, there is no declarative pattern making this possible. You can either implement your own simple list element making use of dom-repeat 's filter property. (With element inheritance coming back in future releases, you might extend iron-list ). However, the best practice I currently see is the use of a computed property: <template> <iron-list

Best way to communicate between instances of the same web component with Polymer?

≡放荡痞女 提交于 2019-12-03 09:27:27
问题 I'm trying to sync some of my web component properties between instances of the same element so if one of this properties changes then the same property gets updated in all the instances with the corresponding binding and events. Note: I want to use the Polymer Data System Concepts for the communications between instances. Example my-element.html <dom-module id="my-element"> <script> Polymer({ is: 'my-element', properties: { myProp: { type: String, notify: true } }); </script> </dom-module>

Polymer 1.0: How to pass an event to a child-node element without using <iron-signals>?

限于喜欢 提交于 2019-12-03 07:46:42
This Stack Overflow answer suggests using <iron-signals> to broadcast an event down the DOM tree to a custom element. Below, I ask a different question. Question How do I: pass an event down to a direct child node (custom element) from a parent (custom element) without using <iron-signals> ? Code This is what I have so far. But it doesn't work. parent-element.html <dom-module id="parenet-element"> <template is="dom-bind"> <child-element></child-element> <paper-button on-tap="_handleTap"></paper-button> </template> </dom-module> <script> (function(){ Polymer({ is: 'parenet-element', _handleTap: