polymer

Using core-dropdown to select multiple items

折月煮酒 提交于 2019-12-23 01:41:31
问题 When a user clicks in a report button, they should be able to select one or more types of issues. I'm trying something like this: <core-icon-button icon="report" on-tap="{{ openDropdown }}"> <core-dropdown> <core-selector valueattr="label" multi> <core-item label="Type 1"></core-item> <core-item label="Type 2"></core-item> <core-item label="Type 3"></core-item> </core-selector> <button on-tap="{{ reportIssue }}">Report</button> </core-dropdown> </core-icon-button> But when I select any item

Using core-dropdown to select multiple items

房东的猫 提交于 2019-12-23 01:41:14
问题 When a user clicks in a report button, they should be able to select one or more types of issues. I'm trying something like this: <core-icon-button icon="report" on-tap="{{ openDropdown }}"> <core-dropdown> <core-selector valueattr="label" multi> <core-item label="Type 1"></core-item> <core-item label="Type 2"></core-item> <core-item label="Type 3"></core-item> </core-selector> <button on-tap="{{ reportIssue }}">Report</button> </core-dropdown> </core-icon-button> But when I select any item

SCSS and “:host([active])”

杀马特。学长 韩版系。学妹 提交于 2019-12-22 18:26:21
问题 I need such construction in scss: :host { background: #fff; &([active]) { background: #000; } } meaning output like: :host { background: #fff; } :host([active]) { background: #000; } But I can't get it working any way I've tried. Is there any way to escape parentheses I don't know or something not overcomplicated? Just inserting piece of raw css like `code` in CoffeeScript would be great, but I do not see anything like this in documentation. 回答1: If you want to use this shadow DOM selectors

Scripting Required for Polymer Submenu/Pages Navigation?

久未见 提交于 2019-12-22 14:59:20
问题 First, I'm loving Polymer. I'm not proficient in javascript, and I don't fully understand all the shadow-DOM stuff that's going on. But I take it that Polymer is under development for people like me (non-full-time coders who need to build websites quickly and programmatically by plugging simple pieces together). It's lots of fun, and once I understand how something in it works, it's really lovely. My latest attempt to build a site / app involves a lot of menu and submenu items connected to

Polymer Web Component Tester Unable to connect to selenium

删除回忆录丶 提交于 2019-12-22 14:42:16
问题 I am running Polymer Web Component Tester on a simple Polymer 2.x application template and get the following output: hook: prepare hook: prepare:selenium Starting Selenium server for local browsers 15:00:30.747 INFO - Selenium build info: version: '3.7.1', revision: '8a0099a' 15:00:30.747 INFO - Launching a standalone Selenium Server 2018-02-26 15:00:30.763:INFO::main: Logging initialized @246ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:00:30.825 INFO - Driver class not found: com.opera

Polymer, how to open/close google-map-marker InfoWindow?

寵の児 提交于 2019-12-22 12:41:56
问题 I'm using the webcomponent google-map-marker in a Polymer element created by me. I want to catch the click on it to do something afterwords in my component, so I tried this on my template: <div horizontal layout flex style="height: 400px;"> <div class="panel-contents" vertical layout flex> <google-map flex map="{{map1}}" latitude="45.5601451" longitude="-73.7120832"> <google-map-marker latitude="45.5601451" longitude="-73.7120832" map="{{map1}}" clickEvents="true" google-map-marker-click="{

Position app-drawer underneath app-header

十年热恋 提交于 2019-12-22 12:27:28
问题 Using the template from starter kit 2, is it possible to have the app drawer below the app-header ? Right now the app drawer starts from the top of viewport and is columnized next to app-header . I would like my app to be like google keep and google cloud console where the app header spans the entire width of the viewport and the app drawer begins underneath. After reading the element catalog for app-layout , I did not see a offical api/attribute to set this. I've tried a few things but no

Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers

久未见 提交于 2019-12-22 10:50:04
问题 I have two separate server,one is nginx with node ,and another one is django with django-rest-framework for build ding REST API,nginx is responsible for the REST API request,node takes care of client request, also i use polymer for the frontend .Below are a brief description: machine one: nginx:192.168.239.149:8888 (API listening address) forward to 192.168.239.147:8080 node:192.168.239.149:80 (client listening address) machine two: unicorn:192.168.239.147:8080(listening address) The process

Socket.io-client no default export

浪尽此生 提交于 2019-12-22 10:17:10
问题 I'm currently working on a project in polymer 3, one of the components needs to import socket.io-client but whatever i try i can't get it to work. I have tried: import io from 'socket.io-client'; what i get back: Uncaught SyntaxError: The requested module '../../node_modules/socket.io-client/lib/index.js' does not provide an export named 'default' same for this: import io from 'socket.io-client/dist/socket.io.js'; what i get back: Uncaught SyntaxError: The requested module '../../node_modules

Localization/Internationalization for Polymer 1.0

非 Y 不嫁゛ 提交于 2019-12-22 09:48:39
问题 I'm looking into solutions for polymer 1.0 and yet I find it hard to understand how this works. Found this https://github.com/Polymer/i18next-element which is unfortunately not even ready yet. Meanwhile I cannot figure out how to use i18next.I'm trying to combine all the info i can find, followed https://github.com/tabacha/javascript-i18n-example/blob/master/i18next/examle.html with any combinations from http://i18next.com/pages/sample.html and made sure to take a look at http://japhr