I'm having trouble displaying the json data correctly.
How can I show the radio buttons from my json file (plunker demo)?
Additionally, I want to validate the form when it is submitted.
Here is the HTML code:
<my-form ng-app="CreateApp" ng-controller="mainController">
<form ng-submit="submitForm()" novalidate>
<fieldset>
<div ng-repeat="field in result.fields">
<label for="{{field.type}}">{{field.label}}</label>
<input
ng-required="{{field.required}}"
value="{{options.value}}"
type="{{field.type}}" >
<form-error ng-show="{{field.errorMessages.required}}"></form-error>
<form-error ng-show="{{field.errorMessages.invalid}}"></form-error>
</div>
</fieldset>
<button type="button" ng-click="onValidate(); return false;"> Validate</button>
<button type="submit" ng-disabled="userForm.$invalid"> Submit </button>
</form>
</my-form>