Created
May 3, 2015 23:07
-
-
Save wstrange/64c751e743580e0544b9 to your computer and use it in GitHub Desktop.
todo_item angular 2 dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library todo_item; | |
import 'package:angular2/angular2.dart'; | |
@Component( | |
selector: 'todo-item' | |
) | |
@View(template: r''' | |
<div> | |
<input type="checkbox" value="{{selected}}"> | |
</div> | |
''') | |
class TodoItem { | |
TodoItem() { print ("new todo"); } | |
String _itemText = "foo"; | |
String get itemText => _itemText; | |
void set itemText(String s) {_itemText = s; print (s); } | |
void set foo(x) => _itemText = x; | |
bool selected = false; | |
//TodoItem(this._itemText); | |
String toString() => itemText; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment