Skip to content
Angular Memory Stats displays your app memory activity
Branch: develop
Clone or download
Pull request Compare This branch is 16 commits ahead of myagoo:develop.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
lib
test
.gitignore
LICENSE
README.md
gulpfile.js
package.json
webpack.config.build.js
webpack.config.js

README.md

angular-memory-stats

Join the chat at https://gitter.im/livingobjects/angular-memory-stats

This plugin is based on Paul Irish's memory-stats.

image

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

You can’t perform that action at this time.