AngularJS - dynamic naming using $index in expression -
I have a command in which I am creating many My code: me I have made many efforts but I can not get it to work. What is the correct way to reference my dynamically designated form? please see here: ng-form and I Based on the name
$ index (
ng-repeat ) My problem is that I want to show an error container (which contains an error message) when the form is invalid, but I do not know how to properly reference the form.
& lt; Ng-form name = "innerform {{index index}}" & gt; & Lt; Label ... & gt; & Lt; Input name = "input" ... /> & Lt; Div class = "error-container" ng-show = "'innerform' + $ index.input. $ Invalid" & gt; // Show error message & lt; / Div & gt; & Lt; / Ng form & gt;
'innerForm' + $ index.input. $ Invalid to
asinForm5.input. $ Should be evaluated as invalid .
Comments
Post a Comment