Skip to content

Instantly share code, notes, and snippets.

@kauffmanes
Last active August 15, 2017 16:32
Show Gist options
  • Save kauffmanes/08efe41714ef3a0682c72e66bcc6ab4b to your computer and use it in GitHub Desktop.
Save kauffmanes/08efe41714ef3a0682c72e66bcc6ab4b to your computer and use it in GitHub Desktop.
Generic Bird/Fish Form
<div data-ng-controller="FormController">
<!-- click a button to see a form -->
<button data-ng-click="getQuestions('fish')">New Fish Record</button>
<button data-ng-click="getQuestions('bird')">New Bird Record</button>
<form novalidate>
<p data-ng-repeat="item in questions">
<label for="">{{ item.label }}</label>
<input type={{ item.type }} data-ng-model="formData[item.id]">
</p>
<button type="submit" data-ng-click="submit()">Submit</button>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment