I am studying Angular.js and I came up with a problem that should probably be simple, but I cannot find the answer.
I want to create form input with the value "connectedTeams", like this in html:
<input type="text" name="connectedTeam[]"> <input type="text" name="connectedTeam[]"> <input type="text" name="connectedTeam[]">
I tried the following in Angular ...
<input type="text" name="connectedTeams[]" class="form-control" ng-model="user.connectedTeams">
... but it binds the same value to all 3 inputs. I know this makes sense, but I cannot figure out how to say that the ng model is user.connectedTeams. [] (user> connectedTeams> add to the array.
Hope this makes sense for someone to respond quickly.
source share