ngPourOver
Installation Steps
bower install ng-pourover
;cd ng-pourover
;npm install
;node example/server.js
(if necessary afternpm 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;
You then have everything you need to initialise your collection – assuming your collection is currently stored in the collection
variable.
$scopecollection = 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.
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.
$scopecollection;
Afterwards you're able to begin filtering on this property.
$scopecollection;
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: