Pergunta

I have found some issue when I launch my polymer project by using pub serve.

In the code bellow the countChanged method is never called. It is works if I run this code via Dart Editor.

@CustomTag('click-counter')
class ClickCounter extends PolymerElement {
  @published int count = 0;

  ClickCounter.created() : super.created() {
  }

  countChanged() {
    window.alert(count.toString());
  }

  void increment() {
    count++;
  }
}

see also https://code.google.com/p/dart/issues/detail?id=17507

note: a compiled js code works fine..

Foi útil?

Solução

The Google Code Issue relating to this issue ha a comment suggesting this code now works. It was likely a bug that was since fixed!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top