Last active
August 15, 2017 16:32
-
-
Save kauffmanes/08efe41714ef3a0682c72e66bcc6ab4b to your computer and use it in GitHub Desktop.
Generic Bird/Fish Form
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
<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