vendredi 30 juin 2017

Javascript Module design pattern in polymer 2.0

A question coming from someone who has no background in polymer 1.0/2.0. There is this huge project currently being held and I've gotten used to using module design pattern for managing code. However in polymer 2.0, we have class based style. Sorry to sound dumb, but is it possible to implement module design pattern in polymer 2.0, or even OOP design pattern? if you have any resources, please direct me there.

Typical skeleton in polymer 2.0

class MyApp extends Polymer.Element {
  static get is() {
    return 'my-app';
  }
  ready() {
    super.ready();
  }
}

How can we make the above in to module design pattern style?

Thanks

Aucun commentaire:

Enregistrer un commentaire