3

Is there a way to use existing Polymer standard core elements , such as core-toolbar and core-menu, in Dart?

If you download the polymer project with bower you can find the javascript versions in /polymer/bower-components/.

core-toolbar, for instance, contains a core-toolbar.html and a metadata.html. These have <polymer-element> tags in them just like in Dart. Can these be adapted?

alex
  • 1,250
  • 2
  • 12
  • 19
  • The PolymerDart team wrote a comment a few weeks that Polymer.js and PolymerDart should basically work together on the same page and that they will continue to improve interoperability but I haven't tried it yet. You can also take a look at the Dart port https://github.com/ErikGrimes/polymer_elements, https://github.com/ErikGrimes/polymer_ui_elements. Core elements are mostly a selection of polymer_elements/polymer_ui_elements. Not all of these elements are fully working yet though. – Günter Zöchbauer May 05 '14 at 05:30

2 Answers2

5

In the meantime, an official package has arrived:

http://pub.dartlang.org/packages/core_elements

And you can even have the paper elements of the material design:

http://pub.dartlang.org/packages/paper_elements

johsin18
  • 483
  • 5
  • 6
  • Thanks for the update. These packages are already available for about a month. They have several issues. It's important to use `Polymer 0.12-0-dev` release which contains several fixes. A new release of `core-elements` and `paper-elements` should be published soon which fixes a lot of issues. – Günter Zöchbauer Jul 27 '14 at 11:59
3

I found this issues:

As mentioned in my comment alternatively you could use the Dart port of polymer_elements and polymer_ui_elements

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • From what you say I understand we're half way there with Eriks work, but not everything is available. – alex May 06 '14 at 14:39
  • Actually since a few months development and maintenance is mostly done by me and it is work in progress. This is because polymer_elements/polymer_ui_elements/core_elements is a moving target (core elements exist only a few weeks as far as I know) and because I can't spend as much time as I would to working on this project and partially because PolymerDart lacks or lacked some features which blocked progress. – Günter Zöchbauer May 06 '14 at 14:50
  • Well you really are a busy bee aren't you! Where do you find the time and the stamina. Does Google pay you to be on Dart watch all day? – alex May 06 '14 at 17:44
  • Because Dart is fun :-) I would love that, but no, Google doesn't pay me. But I learn a lot myself by solving other peoples problems, so I think it pays off in some way. – Günter Zöchbauer May 07 '14 at 04:01
  • 1
    Thanks for your generous spirit Günter! I might have more questions coming though, so beware ;) – alex May 07 '14 at 06:10