An open API service indexing awesome lists of open source software.

https://github.com/avraammavridis/angular-ngperf

Directive to measure the load time of a page's components
https://github.com/avraammavridis/angular-ngperf

Last synced: 6 months ago
JSON representation

Directive to measure the load time of a page's components

Awesome Lists containing this project

README

          

# Angular ngPerf

version 0.1

ngPerf is a tiny module (485 bytes minified) to help you measure the loading time of the various components of your single-page-application.

### Installation
Download and place the script before your angular application script and after the core angular module.
```html



```
Then inject the module into your application:

```js
angular.module('yourApp',['angular-ngperf']);
```

Include the `ng-perf` directive in the components you want to measure.
e.g.
```html



```

Load the page and open the console on the developers tools, you will see something like:

[![Resulte](http://oi57.tinypic.com/6egrk1.jpg)](http://oi57.tinypic.com/6egrk1.jpg)

### Options

| Options | Type | Explanation |
| ------------- |:-------------:| -----:|
| `ng-perf-enable` | boolean | Enable/Disable, default true |
| `ng-perf-threshold` | number (in ms) | Determines the performance budget threshold, default 200 |
| `ng-perf-name`| string | The name of the component on the log |

### Βrowser support table

[![Resulte](http://oi61.tinypic.com/1zdmccm.jpg)](http://oi61.tinypic.com/1zdmccm.jpg)