AngularJS - dynamic naming using $index in expression -


I have a command in which I am creating many 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.

My code:

  & 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;   

me 'innerForm' + $ index.input. $ Invalid to asinForm5.input. $ Should be evaluated as invalid .

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:

     

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -