Here is a code snippet that allows for multiple inputs in a list:
<ion-content>
<ion-list>
<ion-item ng-repeat="player in players">
<ion-label>Player {{$index+1}}</ion-label>
<input type="text" ng-model="player.name"></input>
</ion-item>
</ion-list>
</ion-content>
This next block of JavaScript shows how it's implemented:
angular.module('ionicApp', ['ionic'])
.controller('MyCtrl', function($scope) {
$scope.players = [{name:'Bart'},{name:'Lisa'}];
});
When each item in the list is clicked on, you should be able to enter a string. However, if you replace <input>
with <ion-input>
, the items may no longer allow string entry and just flash when clicked. Does anyone know how to fix this issue?