angular-memory-stats
v1.0.0-beta1
Published
Angular Memory Stats displays your app memory activity
Downloads
173
Maintainers
Readme
angular-memory-stats
This plugin is based on Paul Irish's memory-stats.
Only 3.2Kb (minified version)!
Install
npm i angular-memory-stats --save
Start Chrome with --enable-precise-memory-info
# Linux
google-chrome --enable-precise-memory-info --enable-memory-info
#MacOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-precise-memory-info --enable-memory-info
Otherwise the results from performance.memory are bucketed and less useful.
Add the module to your Angular's dependencies
angular.module('yourModule', [
'angular-memory-stats'
])
Insert the directive in the dom
<angular-memory-stats></angular-memory-stats>
Config
angular-memory-stats is enabled by default, if you wish to disable it use the angularMemoryStatsProvider
Provider
angular.module('yourModule').config(function(angularMemoryStatsProvider){
// Boolean
angularMemoryStatsProvider.enable(true);
// topLeft, topRight, bottomLeft, bottomRight (default)
angularMemoryStatsProvider.setCorner('bottomRight');
// Customize the element (By default zIndex = 1 and position = fixed)
angularMemoryStatsProvider.setCss({
right: '50px',
zIndex: 999999
});
});
Contribute
sudo npm install webpack webpack-dev-server -g
npm install
webpack-dev-server --port 8080
Open http://localhost:8080