【发布时间】:2019-10-02 21:33:00
【问题描述】:
我们如何在具有 Onetomany 映射的 AngularJS 页面上编写输入字段?
User Class has Name and phone attributes and can have multiple phone numbers.
AngularJS code for fName input field
<input tabindex="10" style="width: 60%;" type="text" ng-model="ctrl.user.fName" placeholder="First Name">
''''用于电话映射的 AngularJS 代码 - 因为这是一个 OneToMany 字段,所以我在 User 类中使用了 List,现在我在 AngularJS 页面上有 3 个输入文本字段 - 那么我如何编写 ng-model 相同的,对于第一个文本字段,我已经声明如下,但是第二个和第三个文本字段呢?如何为电话字段声明 ng-model。
<input type="text" ng-model="ctrl.user.phone.phoneNumber" placeholder="Parking #">
【问题讨论】:
标签: angularjs spring-boot