8000 GitHub - adnovum/ngx-cdmon: A simple utility library for monitoring Angular change detection performance.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

adnovum/ngx-cdmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo has been archived. Appreciate later work on fork version. Thanks!

ngx-cdmon

A simple utility library for monitoring Angular change detection performance.

Usage

Add the package to your application:

npm install ngx-cdmon

Add CDMon as a provider, and register whichever TICK_REPORTERS you want to use.

import { CDMon, TickTimer, TICK_REPORTERS } from 'ngx-cdmon';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule],
  providers: [
    CDMon,
    { provide: TICK_REPORTERS, multi: true, useClass: TickTimer }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

Inject the CDMon service afterwards to enable/disable it.

import { CDMon } from 'ngx-cdmon';

@Component({ /*... */ })
export class AppComponent {
  constructor(cdmon: CDMon) {
    cdmon.enable();
  }
}

Custom reporters

Extend the TickReporter class, overriding its methods to hook into the change detection process. See the existing reporters for an example.

About

A simple utility library for monitoring Angular change detection performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0