Angularjs version of p-stats