Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@alkis
Forked from mhevery/gist:550405
Created August 25, 2010 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alkis/550422 to your computer and use it in GitHub Desktop.
Save alkis/550422 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript"
src="http://angularjs.org/ng/js/angular-debug.js" ng:autobind></script>
<script type="text/javascript">
var list = [{timestamp:new Date()}, {timestamp:new Date(1234567890)}, {timestamp:new Date(5678901234)}];
</script>
</head>
<body>
<select name="selectIndex">
<option ng:repeat="i in $window.list" value="{{$index}}" ng:change="selected = []">
{{ i.timestamp | date }}
</option>
</select>
selected={{ $window.list[selectIndex] }}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment