What is wrong with my Angular ng-foreach binding?

I have the following validation summary:

<div ng-if="client.showValidations" class="validation-summary-errors text-danger">
    <span>There be errors!</span>
    <ul>
        <li ng-repeat="(key, value) in client.validationErrors">{{value}}</li>
    </ul>
</div>

Where validationErrors is a collection of object with key and value properties. When I have validation errors, the summary displays them as follows:

{“key”:”FullName”,”value”:”The FullName field is required.”}

While I am trying to only display value, I am seeing the whole object being output as a literal. Where have I gone astray and how?


Source: javascript

Leave a Reply