Skip to content

Instantly share code, notes, and snippets.

@arantius
Created February 9, 2011 15:04
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 arantius/818607 to your computer and use it in GitHub Desktop.
Save arantius/818607 to your computer and use it in GitHub Desktop.
Demonstrating lack of initialization on <input type="radio"> fields.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<script src="http://code.angularjs.org/angular-0.9.10.min.js" ng:autobind></script>
<body>
<form ng:init="form={'value':'gamma', choices: ['alpha','beta','gamma']}">
<label ng:repeat="choice in form.choices">
<input type="radio" name="form.value" value="{{choice}}"> {{choice}}<br>
</label>
<pre>{{form}}</pre>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment