polymer-3.x

External Style file not loaded in polymer 3 application deployed to Spring mvc application

*爱你&永不变心* 提交于 2019-12-11 16:58:13
问题 Styles are loaded in template: static get template() { return html` <style> :host { display: block; border: double; background-color: lightsteelblue; } </style> <iron-ajax auto url="http://localhost:8000/api/clients" handle-as="json" last-response="{{_getClientsResponse}}"></iron-ajax> <h2>Hello [[prop1]]!</h2> <div>host</div> <link rel="stylesheet" href= "/node_modules/ag-grid-community/dist/styles/ag-grid.css"> <link rel="stylesheet" href= "/node_modules/ag-grid-community/dist/styles/ag

how to import a css file from an npm module - webcomponent

*爱你&永不变心* 提交于 2019-12-11 04:41:32
问题 I'm trying to use MDC Components for material design components on my application. I have a custom element in Polymer (LitElement): _render(props) { return html` ${SharedStyles} <style> .js-panel { display: none; } .js-panel.is-active { display: block; } </style> <div class="mdc-toolbar"> <div class="mdc-toolbar__row"> <div class="mdc-toolbar__section mdc-toolbar__section--align-start"> <nav id="tab1" class="mdc-tab-bar mdc-tab-bar--indicator-accent js-tabs" role="tablist"> <a role="tab" aria

Using Google Web Components elements in polymer 3

一世执手 提交于 2019-12-10 19:53:29
问题 How can we install Google Web Components elements in polymer 3 Example - using google-youtube or many more elements can't support npm install yet! https://www.webcomponents.org/element/GoogleWebComponents/google-youtube Is anyone figured out installing this for polymer 3. 回答1: You could try to install it will polymer modulizer npm install -g polymer-modulizer you'll need to have bower installed as well, then in your repo you can run modulizer GoogleWebComponents/google-youtube that will

Polymer 3.0 Uncaught DOM Exception When using Paper-Input

你。 提交于 2019-12-07 02:11:32
问题 When Using paper-input , the import throws the following exception Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry. I haven't done anything besides creating the template for 3.0 and adding the import. There seems to be an issue with the Migration Tool , Google used to update their old components. Has anybody sorted this already? 回答1: UPDATE The issue is caused by two different versions of iron-meta in node

How to publish Polymer 3.x custom element?

夙愿已清 提交于 2019-12-06 08:53:15
问题 I am learning polymer3.x. I made a dummy polymer element. Now i wanted to know how to publish online and use it in some other framework(eg: angular app). I completed the requirements as mentioned in https://www.webcomponents.org, included License file tagged versions added README file But while doing "preview element" i got Error - 12: Missing bower.json. Currently, only Bower is supported. From Polymer version 3, the Polymer team recommends npm instead of Bower . How to publish my polymer

Polymer 3.0 Uncaught DOM Exception When using Paper-Input

孤街醉人 提交于 2019-12-05 06:07:16
When Using paper-input , the import throws the following exception Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry. I haven't done anything besides creating the template for 3.0 and adding the import. There seems to be an issue with the Migration Tool , Google used to update their old components. Has anybody sorted this already? UPDATE The issue is caused by two different versions of iron-meta in node_modules : an older version in ./node_modules/@polymer/iron-meta at 3.0.0-pre.18 (which is already installed with

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

*爱你&永不变心* 提交于 2019-12-02 05:51:37
问题 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at http://127.0.0.1:8000/components/@polymer/polymer/lib/elements/dom-module.js:175:16 Tried deleting node-modules and package-lock and reinstalling did not work. 回答1: For those cases where it's a custom element you're registering simply check that an element by this name hasn't already been registered. Obviously you can include more complex logic to vary the name,

How to implement routing in polymer 3 using app-route

半腔热情 提交于 2019-12-02 02:44:46
问题 I was stuck with implementing routing in polymer 3. I followed the basic guide provided on app-route documentation. But on loading the web page., I don't see any component getting loaded. I checked in shadow DOM and don't see any DOM getting rendered. Not sure what I`m missing. Here is the code. static get properties() { return { page:{ type: String, reflectToAttribute: true, observer: '_pageChanged' } }; } _pageChanged(currentPage, oldPage){ console.log('CURRENT - ', currentPage); console

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

末鹿安然 提交于 2019-12-02 02:36:41
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at http://127.0.0.1:8000/components/@polymer/polymer/lib/elements/dom-module.js:175:16 Tried deleting node-modules and package-lock and reinstalling did not work. For those cases where it's a custom element you're registering simply check that an element by this name hasn't already been registered. Obviously you can include more complex logic to vary the name, decorate the class, etc, however this simply checks to see if something is already registered using the

Paper element import not working in python

隐身守侯 提交于 2019-12-01 23:32:57
问题 Paper elements are not able to import in python-django environment, and an import error arises Uncaught TypeError: Failed to resolve module specifier "@polymer/polymer/polymer-legacy.js". Relative references must start with either "/", "./", or "../". I've tried to build the same project using polymer build still there is no improvement. I've placed the polymer components inside a static folder in an app My project -> App-> static -> polymer files Environment details: OS: ubuntu 18.04 Lang: