meteorwebcomponents / mixin

:twisted_rightwards_arrows: Mixin for polymer/webcomponents in meteor.
MIT License
15 stars 1 forks source link

Polymer 2.0 support #4

Closed EliArtist closed 7 years ago

EliArtist commented 7 years ago

Is there a way to add this with Polymer 2.0 (Synthesis)?

I just started a new project with Synthesis and Polymer 2.0 but I cant figure out how to add this mixin to my class. Could you help me out here?

EDIT: Currently I'm handling the mixin like this: class MyElement extends Polymer.mixinBehaviors([mwcMixin], Polymer.Element)

but it's throwing an error: es5-shim.js?hash=adc3c62…:1242 Uncaught TypeError: Cannot convert undefined or null to object at keys (<anonymous>) at Function.keys (es5-shim.js?hash=adc3c62…:1242) at HTMLElement.attached (mwc-mixin.js:77) at HTMLElement.attached (app.js?hash=fdffe8b…:2251) at HTMLElement.connectedCallback (app.js?hash=fdffe8b…:2517) at HTMLElement.connectedCallback (app.js?hash=fdffe8b…:18355) at CustomElementRegistry.window.customElements.define (custom-elements-es5-adapter.js:4) at meteorInstall.imports.ui.layouts.template.conboxr-grid.js (app.js?hash=fdffe8b…:18361) at fileEvaluate (modules-runtime.js?hash=2b888cb…:207) at require (modules-runtime.js?hash=2b888cb…:130)

aruntk commented 7 years ago

@EliArtist I'm aware of this issue. I'll start working on it. Thanks for reporting.

aruntk commented 7 years ago

Here is a preview version (hybrid mode.) https://github.com/aruntk/kickstart-meteor-polymer-with-app-route/tree/2.0-preview

https://github.com/meteorwebcomponents/mixin/tree/polymer2

meteor add mwc:mixin@2.0.0-beta

aruntk commented 7 years ago

@EliArtist New Polymer 2 mixin beta version is released. Refer https://github.com/meteorwebcomponents/mixin/blob/master/README.md

EliArtist commented 7 years ago

Seems to work perfectly, thank you so much! :)