polymer

Updating a polymer element property with data from API call

时光总嘲笑我的痴心妄想 提交于 2019-12-23 05:31:30
问题 I'm trying to update a property in a polymer element with data from an ajax api call. I have something similar working elsewhere in the app where users are able to add packages dynamically. Anyone know what I'm doing wrong here? <link rel="import" href="../bower_components/polymer/polymer.html"> <link rel="import" href="address-input.html"> <link rel="import" href="package-list.html"> <link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"> <dom-module id="step-one"> <style> <

Authenticate Firebase in Polymer using OAuth token

余生颓废 提交于 2019-12-23 05:01:33
问题 I have a Firebase database that authenticates with a Google account. Currently I have a <google-signin-aware> element that details the app's sign-in details for use with the Google Sign-in API, and upon sign-in authenticates a Firebase reference with the access token returned by the Google sign-in. From the callback for <google-signin-aware> element on successful sign-in: var ref = new Firebase("https://<myapp>.firebaseio.com"); var access_token = gapi.auth2.getAuthInstance().currentUser.get(

How to include external script files for publishing custom Polymer element?

六眼飞鱼酱① 提交于 2019-12-23 04:59:16
问题 I have the following Polymer element with the following dependencies: box-el and player-el other Polymer elements GameController and KeyboardInputManager classes that are defined in external files, game_controller.js . The question is, how do I package and publish this element as stand-alone, so it is legitimate for customelements.io. <link rel="import" href="../../bower_components/polymer/polymer.html"> <polymer-element name="soko-ban"> <template> <link rel="stylesheet" href="soko-ban.css">

Autosize the paper-dropdown-menu width

拥有回忆 提交于 2019-12-23 04:45:50
问题 I have the following <!doctype html> <html> <head> <script src='../bower_components/webcomponentsjs/webcomponents-lite.js'></script> <link rel="import" href="../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> <link rel="import" href="../bower_components/paper-item/paper-item.html"> <link rel="import" href="../bower_components/paper-listbox/paper-listbox.html"> </head> <body unresolved> <dom-module id='base-page'> <template> <paper-dropdown-menu> <paper-listbox class='dropdown

Combining polymer 1.0 with 3.0

旧城冷巷雨未停 提交于 2019-12-23 03:46:24
问题 I am working on modifying an existing project which is built in polymer 1.0. As the current version of polymer is polymer 3.0 how can we include the same without making much changes with the existing application. The main difference than i found out is that in polymer 1.0 .html files are imported whereas in polymer 3.0 .js files are imported. Added below the comparison between two imports polymer 1 <head> <link rel="import" href="../../bower_components/polymer/polymer-element.html"> </head>

Dart Polymer Routing

无人久伴 提交于 2019-12-23 03:41:49
问题 I have a single page app using Dart and Polymer. I'm trying to add a route to another page with route_hierarchical What I've tried so far was configuring the router like this: router = new Router() router.root ..addRoute(name: 'games', path: '/games') ..addRoute(name: 'login', path: '/login') ..addRoute(name: 'home', defaultRoute: true, path: '/'); router.listen(); I've found that I can use new Router(useFragment: ...); to enable the hashbangs in the URLs or not. The problem is that when I

Dart Polymer Routing

孤街醉人 提交于 2019-12-23 03:41:33
问题 I have a single page app using Dart and Polymer. I'm trying to add a route to another page with route_hierarchical What I've tried so far was configuring the router like this: router = new Router() router.root ..addRoute(name: 'games', path: '/games') ..addRoute(name: 'login', path: '/login') ..addRoute(name: 'home', defaultRoute: true, path: '/'); router.listen(); I've found that I can use new Router(useFragment: ...); to enable the hashbangs in the URLs or not. The problem is that when I

Polymer's core-scroll-header-panel with submenu toolbar

百般思念 提交于 2019-12-23 03:16:27
问题 The application I am developing consists of several major sections. To this end, I have a global toolbar for the entire application and a toolbar that is specific to the particular section of the application. Here is a gist that demonstrates what the view for an individual application might look like: https://gist.github.com/mattjonesorg/33b2bbcb0b0c81feb5ca (Paste the gist into the polymer designer for a quick view) I have the main application's toolbar as a core-scroll-header-panel. The

two polymer elements (paper-input) referencing the same object on different instance variable does not work

僤鯓⒐⒋嵵緔 提交于 2019-12-23 02:41:15
问题 I have two polymer elements (paper-input) referencing the same object on different instance variable. When I change the text on one paper-input element, another paper-element does not change, although the referenced object has changed. Following details: >>> Browser >>> main_app.html <dom-module id="main-app"> <template> <h3>Lista de Produtos</h3> <paper-fab icon="add" on-tap="adicionarProduto"></paper-fab> <template is="dom-repeat" items="{{produtos}}" as="item"> <div class="layout vertical"

polymer starter kit, google-map, examples together

穿精又带淫゛_ 提交于 2019-12-23 02:21:21
问题 I am trying to display a google-map on a Polymer Starter-kit page. I start with Polymer init... go with the standard Starter-kit... Do a ... bower install --save GoogleWebComponents/google-map I get a Google Map Key... Everything works great... except. I can not get the damn map to display on a page. I can go through the example and tutorials... no trouble. But getting the tag to work in the Start-kit has been a problem. Does anyone have some examples with google-map in Starter-kit? Ideally