angularjs form can not refer to input control when input name is array -
I face a problem while testing form verification with angular
According to,
An input control that contains ngModel instructions, is an example of the NgModelController. Such a control example can be published as the property of the form example by using the name attribute on input control.
I created the test code, all this works fine until I can not change the input name from
& lt; Input type = "number" name = "user [age]" ng-model = "user.age" max = "100" required & gt; & Lt; P & gt; {. {Form1.user [Age] $ Error}} & lt; / P & gt;
Does this mean that the ARA syntax can not be recognized in form input as an angle?
The problem for me is that I want to keep the general form submission flow and only the angle form validation, so I need to keep the form input as an array to handle the backend form. / P>
This is nothing to do with glass It's a syntax JS error
If you want to refer to a property named
User [Age] , then you should do it:
form1 ['User [Ages]']. $ Error
form1.user [age] is incorrectly interpreted as
(form1 user) [era] < / Code>
Comments
Post a Comment