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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -