polymer-1.0

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"

Can't style element in shadow dom in media query

三世轮回 提交于 2019-12-02 05:12:15
问题 In my styles/app-theme.html I am trying to change the menu icon size of paper-drawer-panel in the media query. This element is in index.html. Since it is in the shadow dom, I can't seem to access it. I tried with: Probably not relevant, but here is the index.html: <template is="dom-bind" id="app"> <paper-drawer-panel force-narrow="true"> <div drawer> <drawer-custom></drawer-custom> </div> <div main> <div id="header-v-center"> <paper-icon-button id="paper-toggle" icon="menu" paper-drawer

styling polymer element in angular2

故事扮演 提交于 2019-12-02 04:51:12
问题 I want to include Polymer Elements into my angular2 App since Angular2 Material still doesn't provide enough elements. Additionally, I want to style the element, i.e. setting the width of it. I have <paper-dropdown-menu class="dropdown" label="Wiederholung" vertical-align="bottom" horizontal-align="right"> <paper-listbox class="dropdown-content"> <paper-item>einmalig</paper-item> <paper-item>wöchentlich</paper-item> <paper-item>monatlich</paper-item> </paper-listbox> </paper-dropdown-menu>

polymer error on reloading

旧时模样 提交于 2019-12-02 04:47:43
i have installed the polymer starter kit and once i load the starter kit every thing gets loaded properly and the url looks like http://127.0.0.1:8887/ then once i click on any view that page gets open and url changes to http://127.0.0.1:8887/view1 but if i reload the browser now, instead of showing the same page it displays the entry not found error.i have tried searching over internet for solution but i didn't find one.what should i do to fix it. When you refresh the page ( http://127.0.0.1:8887/view1 ) you request the view1 resource from the server, but the server can't find it because

Polymer 1.x: Deleting an item from iron-list

筅森魡賤 提交于 2019-12-02 03:54:51
问题 I am trying to delete an item from iron-list using the following code. my-element.html <iron-list id="list" items="[[items]]" as="item" selected-items="{{selectedItems}}" selection-enabled multi-selection> <template> <my-item item="[[item]]" on-tap="_onItemTap"></my-item> </template> </iron-list> ... _onItemTap: function(e) { this.items.splice(e.model.index, 1); } Expected behavior Tap list item List item disappears Select next list item Next list item is selected Actual behavior Tap list

Polymer 1.x: Deleting an item from iron-list

巧了我就是萌 提交于 2019-12-02 02:37:13
I am trying to delete an item from iron-list using the following code. my-element.html <iron-list id="list" items="[[items]]" as="item" selected-items="{{selectedItems}}" selection-enabled multi-selection> <template> <my-item item="[[item]]" on-tap="_onItemTap"></my-item> </template> </iron-list> ... _onItemTap: function(e) { this.items.splice(e.model.index, 1); } Expected behavior Tap list item List item disappears Select next list item Next list item is selected Actual behavior Tap list item List item does not disappear Select same list item (i.e., the one previously intended to be deleted)

Can't style element in shadow dom in media query

孤街醉人 提交于 2019-12-02 01:22:14
In my styles/app-theme.html I am trying to change the menu icon size of paper-drawer-panel in the media query. This element is in index.html. Since it is in the shadow dom, I can't seem to access it. I tried with: Probably not relevant, but here is the index.html: <template is="dom-bind" id="app"> <paper-drawer-panel force-narrow="true"> <div drawer> <drawer-custom></drawer-custom> </div> <div main> <div id="header-v-center"> <paper-icon-button id="paper-toggle" icon="menu" paper-drawer-toggle> @media (max-width: 600px) { iron-icon#icon::shadow { height: 6px; width: 5px; } } and @media (max

styling polymer element in angular2

别说谁变了你拦得住时间么 提交于 2019-12-02 00:31:42
I want to include Polymer Elements into my angular2 App since Angular2 Material still doesn't provide enough elements. Additionally, I want to style the element, i.e. setting the width of it. I have <paper-dropdown-menu class="dropdown" label="Wiederholung" vertical-align="bottom" horizontal-align="right"> <paper-listbox class="dropdown-content"> <paper-item>einmalig</paper-item> <paper-item>wöchentlich</paper-item> <paper-item>monatlich</paper-item> </paper-listbox> </paper-dropdown-menu> EDIT in my index.html I have <!-- polymer components --> <script src="/node_modules/bower_components

How to access content of dom-if inside a custom element?

久未见 提交于 2019-12-01 18:40:34
In a custom element I want to access a span and append a child to it but all usual accessors give undefined : <template> <template is="dom-if" if="[[condition]]" restamp> <span id="myspan"></span> </template> </template> ready() { var a = this.$.myspan; //<------- is undefined var b = this.$$.myspan; //<------- is undefined var c = document.getElementById("myspan"); //<------- is undefined var d = this.$$("#myspan"); //<------- is undefined } How to access a span in this case? UPDATE: here is plunk The reason this didn't work inside the lifecycle callback without setTimeout or this.async is

how to dynamically append an element to dom-if in Polymer?

孤人 提交于 2019-12-01 18:36:46
My goal is to append an element to existing dom-if dynamically. Problem is that after appending I can see appended element in the DOM three but it never reacts on condition and stays always hidden. <template> <template id="domif" is="dom-if" if="[[condition]]" restamp></template> </template> ready() { var el = document.createElement("input"); Polymer.dom(this.$.domif).appendChild(el); Polymer.dom.flush(); } Exploring DOM with hardcoded dom-if and input shows that <input /> element is actually not a child of dom-if but lives next to it.. <template> <template is="dom-if" if="[[condition]]"