Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how
C#
to repeat a div as the number entered


the div I want to repeat is:


HTML
 <div class="form-group">
                   
                    <div class="col-md-6 col-xs-12">

                   <li>Option {{i}}</li>

<input type="radio" ng-model="score" ng-value=""/>
<br>
<textarea  ng-model="option" class="form-control"   ></textarea>
                    </div>
                    </div>


What I have tried:

i need Help plz

HTML
<div ng-repeat="i in range(Data.nop) track by $index">
$scope.range = function(nop){

  var input = []; 
nop = parseInt(nop);
  for (var i = 0; i < nop; i++) { 
    input.push(i+1) 
  } 

  return input;
}

but ng-model=option not work.
Posted
Updated 2-Sep-16 2:11am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900