1

I am a bit new to AngularJS and am having problems getting more than one filter to work together. I have a collection of ~100 Project objects. I want to select the 10 most recent "projects" ascending. I have the following code:

<tr ng-repeat="project in projects | orderBy:'Timestamp' | limitTo:10 ">
  <td>{{project.Poster}}</td>
  <td>{{project.Message}}</td>
</tr>

The above displays all projects ordered by Timestamp, but does not limit number of projects displayed.

What am I doing wrong?

2
  • 2
    I can't see anything wrong with it. I've copied it into a plunker to be sure, but it works. Can you add some additional context info to the plunker?
    – null
    Commented Mar 13, 2014 at 19:20
  • Wow, thanks for the work on that. Is there any difference when loading the collection from Firebase: .factory('Projects', function($firebase, fbURL) { return $firebase(f); })
    – JSK NS
    Commented Mar 14, 2014 at 13:28

0