I have the following code that works except for the part where I try to add the ng-messages (they don't display). From my understanding, the ng-messages attaches to the name element. What am I doing wrong here?
<form ng-submit="submit(form)" name="form">
<div ng-repeat="question in questions">
<div ng-switch="question.type">
<div ng-switch-when="text">
<md-input-container class="md-block">
<label>{{question.title}}</label>
<input md-maxlength={{question.maxLength}}
required md-no-asterisk
name="questionStorage[question.id]"
ng-model="questionStorage[question.id]">
<div ng-messages="form[questionStorage[question.id]].$error">
<div ng-message="required">This is required.</div>
...