Skip to content

Instantly share code, notes, and snippets.

@andreroggeri
Created October 27, 2018 14:00
Show Gist options
  • Save andreroggeri/8fe72c5f22fcbf295973d5d5e0762674 to your computer and use it in GitHub Desktop.
Save andreroggeri/8fe72c5f22fcbf295973d5d5e0762674 to your computer and use it in GitHub Desktop.
Checks the Angular stability and logs on the console.
currentStatus = undefined;
root = $('app-root');
setInterval(() => {
newStatus = window.getAngularTestability(root).isStable();
if(currentStatus !== newStatus){
currentStatus = newStatus;
console.log(`Stable status changed to => ${currentStatus}`);
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment