Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support data binding with ES6 module? #1465

Closed
yiwiz-sai opened this issue Apr 29, 2015 · 1 comment
Closed

support data binding with ES6 module? #1465

yiwiz-sai opened this issue Apr 29, 2015 · 1 comment

Comments

@yiwiz-sai
Copy link

I really like polymer. but I like ES6 module too.
I don't know many about polymer, could it support ES6 module as data binding source?

with systemjs project, I have created many ES6 modules like this:

import $ from "jquery"
export class DocEditor {
    constructor(){
         this.name="sai"
    }
    render() {}
}

I hope Polymer could reuse ES6 module in "component" so that I needn't write code like this

<script>
  Polymer({
    is: "DocEditor",
    properties: {
      greeting: {
        type: String,
        name: "sai"
      }
    }
  });
</script>

I think porting ES6 module to this syntax is meaningless, and I trusted the ES6 module will be web standard in future, why should I study a new module syntax?

btw: another framework "aurelia" had finished data binding with ES6 module

Thanks.

@kevinpschaaf
Copy link
Member

We are excited about ES6 modules and want to support that development pattern once they are widely available in browsers without transpiling. Once ES6 classes are widely available, we will likely add a syntax for creating Polymer element prototypes using an ES6 class syntax. In the short-term, we are avoiding requiring users of Polymer to buy in to transpilation steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants