Created
March 31, 2013 22:14
-
-
Save shailen/5282216 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<div> | |
<h3>Person record</h3> | |
<p><em>First Name: </em> {{ person['firstName'] }}</p> | |
<p><em>Last Name: </em> {{ person['lastName'] }}</p> | |
<p><em>Address: </em> | |
{{person['address']['street']}}, | |
{{person['address']['city']}}, | |
{{person['address']['state']}}, | |
{{person['address']['zip']}} | |
</p> | |
<div><em>Has lived in:</em> | |
<ul> | |
<template iterate="place in person['hasLivedIn']"> | |
<li>{{place}}</li> | |
</template> | |
</ul> | |
</div> | |
</div> | |
<hr> | |
<div> | |
<h3>Edit record</h3> | |
First Name: <input type="text" bind-value="person['firstName']"><br> | |
Last Name: <input type="text" bind-value="person['lastName']"><br> | |
Address Street: <input type="text" bind-value="person['address']['street']"><br> | |
Address City: <input type="text" bind-value="person['address']['city']"><br> | |
Address State: <input type="text" bind-value="person['address']['state']"><br> | |
Address Zip: <input type="text" bind-value="person['address']['zip']"><br> | |
Has lived in: | |
<ul> | |
<template iterate="place in person['hasLivedIn']"> | |
<input type="text" bind-value="place"><br> | |
</template> | |
</ul> | |
</div> | |
<script type="application/dart"> | |
import 'package:web_ui/web_ui.dart'; | |
var person; | |
main() { | |
person = toObservable({ | |
'firstName': 'Jon', | |
'lastName': 'Smith', | |
'address' : toObservable({ | |
'street': '1122 Main Street', | |
'city': 'Philadelphia', | |
'state': 'PA', | |
'zip': '19103' | |
}), | |
'hasLivedIn' : toObservable(['Boston, MA', 'Austin, TX', 'Santa Fe, NM']) | |
}); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment