2013-10-19 66 views

回答

4

Seth Ladd's GitHub space有幾個例子。

這裏爲文本輸入結合一個具體的例子:

<polymer-element name="my-example"> 
    <template> 
    <div> 
     Type something: <input type="text" value="{{message}}"> 
    </div> 
    <div> 
     You typed {{message}} 
    </div> 
    </template> 
    <script type="application/dart" src="my_example.dart"></script> 
</polymer-element> 



import 'package:polymer/polymer.dart'; 

@CustomTag('my-example') 
class MyExample extends PolymerElement with ObservableMixin { 
    @observable String message; 
} 
相關問題