Please check this Fiddle: http://jsfiddle.net/houmaka/vHXy4/
When user fills different fields ng-repeat order the output. How can I enforce a custom ordering based on my fields array? (There are more than 20 fields in the form, I just put a snapshot of the actual form.)
a quick glance:
$scope.fields = [];
$scope.fields = {
contact_person: 'Contact Person',
app_owner_name: 'Name of Application Owner',
app_owner_phone_number: 'Application Owner Phone Number',
}
And to show them:
<div>
<div ng-repeat="(key, value) in user">
<div ng-show="value">
<div>{{fields[key]}}:</div>
<div>{{value}}</div>
</div>
</div>
</div>
Thanks