that's what I have.
<form action="/asvabo/ChangeCustomerRegister.do" method="post"
name="CustomerRegisterForm">
...
<input ... type="text" ... name="order.id" pattern="[0-9]*" required
ng-model="orderid" ng-trim="true"/>
<!-- Label for show that the input is required -->
<span class="error"
ng-show="CustomerRegisterForm.order.id.$error.required">Required!
</span>
....
</form>
I think, there is a problem with the NAME attribute. If i use orderid in both, the input-tag and the following error condition it works. But we work with Struts and i need the NAME attribute like xxxx.yyyy
Is there a way to use this syntax in der ng-show
exprssion?
Thanks for comments.
form.$addControl = function(control) {
// Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored
// and not added to the scope. Now we throw an error.
assertNotHasOwnProperty(control.$name, 'input');
controls.push(control);
if (control.$name) {
form[control.$name] = control;
}
};
In your case, the input's control.$name === "order.id"
, so this what happens:
form["order.id"] = control;
<span class="error"
ng-show="CustomerRegisterForm['order.id'].$error.required">Required!
</span>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.