0
    <li ng-repeat="Item in Items">        
            <a href="#">{{$index}}</a>            
</li>

Can i use a specific value for Items like {{Item.PageCount}}. I want to repeat number of PageCount. Want to print only {{$index}} . cant we use ng-repeat like ng-repeat="Item in {{Item.PageCount}}"

Isuru
  • 530
  • 3
  • 9
  • 25
  • Can't understand what you really want... Do you want to achieve something like pagination with displaying only proper page, or do you want to list just page numbers? – ProdoElmit Dec 04 '13 at 13:41
  • 1
    Maybe this helps: http://stackoverflow.com/questions/11873570/angularjs-for-loop-with-numbers-ranges – hgoebl Dec 04 '13 at 13:43
  • yes this is for pagination.. I want to list page numbers – Isuru Dec 04 '13 at 13:51
  • There is no default way of repeating a set number of times instead of over an iterable. You will need something like what hgoebl linked to, eitehr a filter that creates an array or a function in your scope that does it. – Erik Honn Dec 04 '13 at 13:56
  • @Isuru You could populate numbers by pushing each page number into array. Use the array and `ng-repeat` to render a `ul>li` that displays page numbers – Deeptechtons Dec 04 '13 at 14:15

0 Answers0