How would I change this:
ng-messages="createCourseForm.quizItemMultipleChoiceAnswer+$index.$error"
into:
ng-messages="createCourseForm.quizItemMultipleChoiceAnswer0.$error"
How would I change this:
ng-messages="createCourseForm.quizItemMultipleChoiceAnswer+$index.$error"
into:
ng-messages="createCourseForm.quizItemMultipleChoiceAnswer0.$error"
It looks like you are trying to access a specifically named property from your form. If you need the property name to be variable, you can use javascript's bracket notation for accessing properties. Then you can pass in any string and access the property.
ng-messages="createCourseForm['quizItemMultipleChoiceAnswer' + $index].$error"