Is there a reference guide for (Dart) Polymer

68 views
Skip to first unread message

robin.b...@gmail.com

unread,
Sep 15, 2013, 12:08:58 PM9/15/13
to polym...@googlegroups.com
On of the first Dart Polymer examples looks like this:
<polymer-element name="click-counter">
  <template>
    <button on-click="increment">Click Me</button>
    ..etc

@CustomTag('click-counter')
class ClickCounterElement extends PolymerElement with ObservableMixin {
  @observable int count = 0;
    ..etc

Is there a reference guide that list and explains all possible tags like 'on-click" (unfortunately intelisense does not help you here),
and annotations like "@CustomTag"  "@observable" 

txs

Eric Bidelman

unread,
Sep 15, 2013, 3:03:38 PM9/15/13
to robin.b...@gmail.com, polymer-dev
Hi Robin,

You've probably seen https://www.dartlang.org/polymer-dart/, which lists some of the features. But Polymer's API reference is up at http://www.polymer-project.org/polymer.html. No idea where the port is w.r.t. to feature parity, so you should probably ask over on that mailing list.


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Seth Ladd

unread,
Sep 15, 2013, 6:21:19 PM9/15/13
to robin.b...@gmail.com, web-ui
(BCC Eric and polymer-dev)
(CC web-ui)

Hi Robin,

Thanks for reaching out. First up, thanks for the suggestion for code completion of on-* in HTML. We'd love it if you could file that feature request at http://dartbug.com/new and paste the link to the issue here.

The briefly answer your question, on-* should map to the HTML event names. For example, on-click, on-key-up, etc. You can find a list here: http://api.dartlang.org/docs/releases/latest/dart_html/Element.html#onClick  (check out all the onFoo methods).  That's just for Element, other HTML tags have more specific events. Were you looking for one in particular?

Meanwhile, you might find these samples useful: https://github.com/sethladd/dart-polymer-dart-examples There's 30+ mini demos of various Polymer.dart features. If you can't find what you're looking for, let us know.

As we work more on the Polymer.dart port, we'll be closer and closer to Polymer-for-JavaScript. As Eric pointed out, the docs on polymer-project.org are a good starting point to get an idea of what should be available to Dart developers.

Don't hesitate to send more questions,
Seth

Reply all
Reply to author
Forward
0 new messages