polymer-3.x

Relative references must start with either “/”, “./”, or “../”

狂风中的少年 提交于 2021-02-18 21:12:08
问题 I am newbie to lit-element, and when use import to include the library, I am getting error as: Uncaught TypeError: Failed to resolve module specifier "lit-element". Relative references must start with either "/", "./", or "../". Please provide any alternatives/solutions. import { LitElement, html } from 'lit-element'; class MyElement extends LitElement { render(){ return html` <div> <p>A paragraph</p> </div> `; } } customElements.define('my-element', MyElement); 回答1: This doesn't work because

Relative references must start with either “/”, “./”, or “../”

懵懂的女人 提交于 2021-02-18 21:12:01
问题 I am newbie to lit-element, and when use import to include the library, I am getting error as: Uncaught TypeError: Failed to resolve module specifier "lit-element". Relative references must start with either "/", "./", or "../". Please provide any alternatives/solutions. import { LitElement, html } from 'lit-element'; class MyElement extends LitElement { render(){ return html` <div> <p>A paragraph</p> </div> `; } } customElements.define('my-element', MyElement); 回答1: This doesn't work because

How to add mixin for height in mwc textfield?

丶灬走出姿态 提交于 2020-04-12 14:45:31
问题 I am using polymer 3 and lit-element(2.2.1). The version of mwc-textfield is 0.13.0. I have read the documentations related to this version.In this documentation, I have found that we can add mixin for height. I had tried several ways but did not succeed. May be the syntax I am using is wrong. I want to decrease the height of my text field. This is my text field <mwc-textfield id="textBox" .type="text" .value=${this.title} .placeholder='' minLength="10" maxLength="256"></mwc-textfield> and my

How to add mixin for height in mwc textfield?

丶灬走出姿态 提交于 2020-04-12 14:40:51
问题 I am using polymer 3 and lit-element(2.2.1). The version of mwc-textfield is 0.13.0. I have read the documentations related to this version.In this documentation, I have found that we can add mixin for height. I had tried several ways but did not succeed. May be the syntax I am using is wrong. I want to decrease the height of my text field. This is my text field <mwc-textfield id="textBox" .type="text" .value=${this.title} .placeholder='' minLength="10" maxLength="256"></mwc-textfield> and my

lit-element passing data from one component to another

百般思念 提交于 2020-01-15 06:20:10
问题 I am currently learning how to user lit-element v2.0.0-rc.2 I have two components app.js and list-items.js. In app.js I am collecting data from local storage and storing it in this.todoList, Im then calling this.todoList in my list-items.js but the problem I am running into is that it is not passing the data as an array but as an object, I am trying to output that data in list-items all Im getting when I do a console.log of this.todoList is [object] in my tags it is rendering out with dots

Polymer 3 - Google Maps

对着背影说爱祢 提交于 2019-12-29 08:54:29
问题 I would like to know how to include Google Map in Polymer 3. I have just upgraded to Polymer 3 from Polymer 2. This is my sample that is not working base of the starter-kit import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; import '@em-polymer/google-map/google-map.js'; import '@em-polymer/google-map/google-map-marker.js'; import './shared-styles.js'; class MyView1 extends PolymerElement { static get template() { return html` <style include="shared-styles"> :host {

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>

Can't find packages in stackblitz, even though it is present in npm website. How to install then?

和自甴很熟 提交于 2019-12-14 04:03:30
问题 I was installing dependencies for polymer app in stackblitz. It said 3 packages could not be found, but ther were present in npm website. I tried cdn also. Even that did not work. Screenshots: I have also installed CDN from this website in external sources of stackblitz. Please help where am i going wrong. Thanks in advance. 回答1: This stackoverflow answer helped me. Installing like: @polymer/iron-ajax@3.0.0-pre.21 worked for me. 来源: https://stackoverflow.com/questions/52196838/cant-find

Polymer 3 - Google Maps files missing

随声附和 提交于 2019-12-13 10:29:38
问题 I am having the same issue as Polymer 3 - Google Maps. After reading the above thread, I seem to be missing the two files google-apis/google-maps-api.js and google-map-marker.js . In the hope it would download all the dependent files for Google Maps I issued these commands: npm install @em-polymer/google-map npm install google-maps npm install What am I doing wrong? 回答1: This worked for me. import { html } from '@polymer/lit-element'; import '@em-polymer/google-map/google-map.js'; import '@em

How do you push Application updates on an installed PWA application?

拈花ヽ惹草 提交于 2019-12-11 18:05:39
问题 My question is, Is it possible for the Users to acquire these changes without having to REINSTALL the PWA application? I have a PWA application deployed in Production. The client already installed the deployed PWA application in their MOBILE devices and I want to DEPLOY another patch of updates in the PWA application in the HTTP server. 回答1: Another simple way to update application is using workbox-window. You can detect updates in PWA and restart your application to get the last updates. For