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}}"

5
  • 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? Commented Dec 4, 2013 at 13:41
  • 1
    Maybe this helps: stackoverflow.com/questions/11873570/… Commented Dec 4, 2013 at 13:43
  • yes this is for pagination.. I want to list page numbers Commented Dec 4, 2013 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. Commented Dec 4, 2013 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 Commented Dec 4, 2013 at 14:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.