polymer

Polymerfire <firebase-app> element crashes app

核能气质少年 提交于 2019-12-02 08:20:44
I just added the new Polymerfire <firebase-app> element to my (Polymer 1.x + Firebase 3.x) project and it crashed the project. I expected to see the home screen load on localhost but, instead, I just get a blank screen and console error. my-element.html <firebase-app auth-domain="my-app-id.firebaseapp.com" database-url="https://my-app-id.firebaseio.com/" api-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"> </firebase-app> The console log reports the following error: Console.log firebase-app.html:94 Uncaught ReferenceError: firebase is not defined The relevant line of code (line #94) is the

Understanding Polymer data-binding and HTML tags

◇◆丶佛笑我妖孽 提交于 2019-12-02 08:19:58
I'm new to Polymer and while testing data-binding, I discover that I have to encapsulate double-mustache expressions within HTML tags (for example <span>{{var}}</span> ). If not, variable is simply not expanded and printed as is. An exemple (from Polymer Quick Tour ), with a line more to show this behaviour. You can also find it on Plunker . <dom-module id="name-tag"> <template> <!-- Will print : This is {{owner}}'s name-tag element. --> This is {{owner}}'s name-tag element.<br /> <!-- Will print : This is Daniel's name-tag element. --> This is <b>{{owner}}</b>'s name-tag element. </template>

How to enforce required paper-radio-group in Polymer?

天涯浪子 提交于 2019-12-02 07:44:41
What's the best way to enforce require check on paper-radio-group ? I saw another question and answer that uses fallback-selection , here , but I want to force the user to choose "yes" or "no". <paper-radio-group selected="" attr-for-selected="value" data-required="{{question.required}}"> <paper-radio-button name="{{question.id}}" value="yes">Yes</paper-radio-button> <paper-radio-button name="{{question.id}}" value="no">No</paper-radio-button> </paper-radio-group> The only way I can think of, is to run a checker function at the end to check for it specifically. checkAnswers: function() { var

Handling scrolling using iron-scroll-threshold in Polymer 2.0 for scroll-target = document

北慕城南 提交于 2019-12-02 07:29:29
I am trying to handle scroll threshold events. Using following lines of code <link rel="import" href="../../bower_components/polymer/polymer-element.html"> <link rel="import" href="../../bower_components/iron-scroll-threshold/iron-scroll-threshold.html"> <dom-module id="documentscroll-app"> <template> <style> :host { display: block; } iron-scroll-threshold { display: none; } </style> <h2>Hello [[prop1]]!</h2> <!-- scroll-target uses the document scroll --> <iron-scroll-threshold id="scrollThreshold" scroll-target="document" lower-threshold="500" on-lower-threshold="loadMoreData"> </iron-scroll

flatiron-director / core-pages SPA with route specific js functions & default route

会有一股神秘感。 提交于 2019-12-02 07:06:47
i am working with flatiron-director and core-pages. my question is how would i set a default route? also how do i call js functions on specific routes. my code looks something like this <template is="auto-binding"> <flatiron-director id='page-director' route="{{route}}" autoHash on-director-route="{{routeChanged}}"></flatiron-director> <core-menu id="menu"> <paper-item icon="list" label="1"> <a href="#1"></a> </paper-item> <paper-item icon="swap-vert" label="2"> <a href="#2"></a> </paper-item> <paper-item icon="file-download" label="3"> <a href="#3"></a> </paper-item> </core-menu> <core-pages

Is Polymer v1.0 compatible with phonegap build?

孤者浪人 提交于 2019-12-02 06:45:14
Is Polymer v1.0 compatible with phonegap build? I tried to build the polymer starter kit but the build was not a success. @Ahemed, Polymer is new and experimental. It works with only a few browsers. Phonegap, at this time, does NOT support polymer. Your questions are best directed to the one and only (as of the moment) meetup group in Silicon Valley on this subject. http://www.meetup.com/Web-Components-Silicon-Valley-Meetup/ Best of Luck. 来源: https://stackoverflow.com/questions/31636632/is-polymer-v1-0-compatible-with-phonegap-build

Firebase Security Rules Block Writing to Firebase

天涯浪子 提交于 2019-12-02 06:35:21
Note: This question is tagged polymer because the Polymer library is used to generate the Javascript. This question is about two different but related problems dealing with Firebase security. Problem 1 and Problem 2 seem to suggest opposite realities and opposite results when trying to get the Firebase security rules to work. (FWIW: Here is my prior unsuccessful attempt to write this question .) Here is the live code in a JSBin . http://jsbin.com/hinehoyigo/edit?html,output Problem 1 Firebase Security Rules Block Writing to Firebase Instructions Enter your firebase ID. Example: "hot-sauce-123"

Is there a way to allow safe html data bind in polymer?

穿精又带淫゛_ 提交于 2019-12-02 06:29:46
问题 Is there a way to allow data bind with html rendering in polymer? For example in AngularJS there is the "ng-html-bind" directive that does the job. I am searching something similar. Here it follows an example of where I am willing to use it. <core-tooltip> <core-icon icon="info-outline" size="30"></core-icon> <div tip> {{box.description}} </div> </core-tooltip> Otherwise any suggestion on how to do it differently? I am loading this data from a json file and I am searching for a general way to

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

*爱你&永不变心* 提交于 2019-12-02 05:51:37
问题 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at http://127.0.0.1:8000/components/@polymer/polymer/lib/elements/dom-module.js:175:16 Tried deleting node-modules and package-lock and reinstalling did not work. 回答1: For those cases where it's a custom element you're registering simply check that an element by this name hasn't already been registered. Obviously you can include more complex logic to vary the name,

Polymer 1.0 paper-drawer-panel toggle is not working

删除回忆录丶 提交于 2019-12-02 05:48:56
'my-layout' code : <link rel="import" href="../bower_components/iron-icons/iron-icons.html" > <link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html" > <link rel="import" href="../bower_components/paper-drawer-panel/paper-drawer-panel.html" > <link rel="import" href="../bower_components/paper-header-panel/paper-header-panel.html" > <link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html" > <polymer-element name="m-layout" > <template> <paper-drawer-panel> <paper-header-panel drawer> <paper-toolbar> <div>Application</div> </paper-toolbar>