After receiving the JSON response from the server as shown below,
{"errors":{"email":["is invalid"],"password":["can't be blank"]}}
I assigned it to a scope named "errors" in my controller and am utilizing it in my view.
Here is an example of my view:
<div class="alert alert-danger" role="alert" ng-show="errors" ng-repeat="error in errors">
<li ng-repeat="(key, value) in error">{{key}} {{error[key]}}</li>
</div>
The problem I am encountering is that it displays the values enclosed in arrays as well. How can I properly loop through so that it doesn't display the array symbols and quotes?
Currently, this is what is being displayed:
email ["is invalid"]
password ["can't be blank"]