0.1.19 • Published 10 years ago

ng-pourover v0.1.19

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

ngPourOver

Installation Steps

  • bower install ng-pourover;
  • cd ng-pourover;
  • npm install;
  • node example/server.js (if necessary after npm install);
  • Browse to http://localhost:5001/;

Getting Started

NYTimes' PourOver module allows for quick filtering and sorting.

In the example we are filtering within ~10 milliseconds a 100,000 collection.

Getting started with ngPourOver is fairly straightforward you first need to add the dependency PourOver into your controller.

$myApp.controller('myController', ['PourOver', function(PourOver) {

}]);

You then have everything you need to initialise your collection assuming your collection is currently stored in the collection variable.

$scope.collection = new PourOver(collection);

If you attempt the aforementioned without adding the poCollection filter the work-horse of the ngPourOver module, then things won't be pretty. Ensure you've added the poCollection to your template.

<li ng-repeat="model in collection | poCollection">

Logically the next step is to define your first filter on a property let's say you have a property called name defined in your collection.

$scope.collection.addExactFilter('word');

Afterwards you're able to begin filtering on this property.

$scope.collection.filterBy('word', 'Supercalifragilisticexpialidocious');

You're even able to unfilter all with the unfilter method, and unfilter a specific filter with unfilterBy.

Unit Tests

All of ngPourOver's unit tests are written in Jasmine and can be run with grunt test after you have followed the installation steps above.

Please open a pull request for all commits, and ensure all tests are passing before opening your PR.

Every developer's dream:

0.1.19

10 years ago

0.1.18

10 years ago

0.1.17

10 years ago

0.1.16

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago