polymer

How to view the Polymerfire demo using Polymer’s `polymer serve` polyserve server?

喜欢而已 提交于 2020-01-03 16:25:43
问题 I want to view this demo of Polymerfire in my browser. I expect to see the demo run in my browser. Instead, I see a blank page and the following console error. console.log.error.message GET http://localhost:8080/ 404 (Not Found) Navigated to http://localhost:8080/ I used the following procedure: I installed the Polymer-CLI multi-tool per the instructions found here. I created a project using the Polymer Starter Kit (PSK). I named the project my-app . I installed the Github repo found here

How to view the Polymerfire demo using Polymer’s `polymer serve` polyserve server?

寵の児 提交于 2020-01-03 16:25:11
问题 I want to view this demo of Polymerfire in my browser. I expect to see the demo run in my browser. Instead, I see a blank page and the following console error. console.log.error.message GET http://localhost:8080/ 404 (Not Found) Navigated to http://localhost:8080/ I used the following procedure: I installed the Polymer-CLI multi-tool per the instructions found here. I created a project using the Polymer Starter Kit (PSK). I named the project my-app . I installed the Github repo found here

Switching content when tab selected using polymer ui elements tabs

余生长醉 提交于 2020-01-03 13:31:44
问题 I'm trying to use the polymer-ui-tabs component for a traditional tab component where you switch content based on which tab is selected. Unless I'm missing something the polymer-ui-tabs component only seems to provide the tab selector bit without an in built mechanism for switching content. Is that correct? If it doesn't then how do I build that on top of it? The most likely thing I found was onPolymerSelect in polymer_selector but that method currently looks like this Stream<CustomEvent> get

dom-repeat template fails to render array with error 'expected array for items'

心不动则不痛 提交于 2020-01-03 12:59:30
问题 I have a simple template that renders an array object. However, it fails with the following message: [dom-repeat::dom-repeat]: expected array for `items`, found [{"code":1,"name":"Item #1"},{"code":2,"name":"Item #2"},{"code":3,"name":"Item #3"}] The array is passed in the attribute of the custom element in the following format: [{"code":1,"name":"Item #1"},{"code":2,"name":"Item #2"},{"code":3,"name":"Item #3"}] I have read the docs on template repeaters several times and still unable to

Class constructor PolymerElement cannot be invoked without 'new'

匆匆过客 提交于 2020-01-03 09:03:10
问题 Yesterday my app worked perfectly however when I now do polymer serve -o it opens the app and prints this error in the console. Class constructor PolymerElement cannot be invoked without 'new' 回答1: Clear the Cached files and images from your browser cache. If you loaded custom-elements-es5-adapter.js , remove it. Then use $ polymer serve --compile never . According to this post, this issue is cause because $ polymer serve compiles your code to es5 automatically. The --compile never flag stops

Class constructor PolymerElement cannot be invoked without 'new'

亡梦爱人 提交于 2020-01-03 09:03:08
问题 Yesterday my app worked perfectly however when I now do polymer serve -o it opens the app and prints this error in the console. Class constructor PolymerElement cannot be invoked without 'new' 回答1: Clear the Cached files and images from your browser cache. If you loaded custom-elements-es5-adapter.js , remove it. Then use $ polymer serve --compile never . According to this post, this issue is cause because $ polymer serve compiles your code to es5 automatically. The --compile never flag stops

How to style Angular4 custom components based on attribute?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 05:24:13
问题 In Polymer we have this concept where we add specific properties to certain components, and then style that component with associated attribute. (This way, it differentiates them from the same component that doesnt have that attribute. For example Polymer <osb-retailer-details overlay></osb-retailer-details> <osb-retailer-details></osb-retailer-details> And then to style <osb-retailer-details> component with overlay attribute, we do the following: :host { box-sizing: border-box; display:

Polymer paper-fab with position:fixed behaves strangely when used with core-list that has a scrollTarget

≡放荡痞女 提交于 2020-01-03 05:14:15
问题 I took the polymer demo messages example, put it into a jsbin and then edited it to pull out the list and fab into a separate polymer element. In other words pretending that we wanted to make the inbox editor a reusable component. This more closely resembles my application, as I have broken it into many such components to make it more modular (one of the great benefits of web components IMO). As the fab is part of this new element then leaving it position absolute puts it at the very bottom

Polymer: Uncaught TypeError: Cannot read property 'persistent' of undefined

爱⌒轻易说出口 提交于 2020-01-03 02:23:14
问题 when I try to hide drawer in Login page it occur error. I use dom-if for hiding menubar and according to it's syntax I used <template> tag. But it occur error. Polymer code <!-- Drawer content --> <template is="dom-if" if="[[_isLogin()]]"> <app-drawer id="drawer" slot="drawer" swipe-open="[[narrow]]"> <app-toolbar>Menu</app-toolbar> <iron-selector selected="[[page]]" attr-for-selected="name" class="drawer-list" role="navigation"> <a name="homepage" href="[[rootPath]]homepage">Homepage</a> <a

Firebase and app-indexeddb-mirror integration not working

旧时模样 提交于 2020-01-02 20:19:08
问题 I'm trying to integrate Firebase with app-indexeddb-mirror element to cache user data and deliver it when he's offline. I ceated an element that should list the name of all users in my firebase database even when I'm offline. <link rel="import" href="../bower_components/polymer/polymer.html"> <link rel="import" href="../bower_components/polymerfire/polymerfire.html"> <link rel="import" href="../bower_components/app-storage/app-indexeddb-mirror/app-indexeddb-mirror.html"> <dom-module id=