0

I have a array like this:

   $scope.sortable = [["inProgressCounter","31"],["approvedCounter","3"],["pendingCounter","35"],["rejectedCounter","0"]]

I need to show them with ng-repeat my code is:
<ul>
 <li ng-repeat="info in sortable">{{info[0]}}{{info[1]}}</li>
</ul>

but it gives me nothing. so I also tried print the data out in html like this:

{{sortable}}
<ul>
     <li ng-repeat="info in sortable">{{info[0]}}{{info[1]}}</li>
    </ul>

it works,and shows me the data.

2
  • can you post your controller code, where are you assigning $scope.sortable ? Commented Feb 18, 2015 at 22:15
  • I may know what you think, I tried this :{{sortable}} <ul> <li ng-repeat="info in sortable">{{info[0]}}{{info[1]}}</li> </ul> it shows the data Commented Feb 18, 2015 at 22:17

1 Answer 1

1

Here is a plunker of this working. This was all using the code you provided.

There must be something wrong with your controller, or you arent even assigning a controller to anything.

code   

http://plnkr.co/edit/4pEsP6mr0tA6Toe9coTG?p=preview

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.