Created
July 26, 2016 06:00
-
-
Save iamssen/f159b364568b2a449c7e003b74329780 to your computer and use it in GitHub Desktop.
@debugCycle() @component({...}) class AngularComponent { ... }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AfterViewChecked} from '@angular/core'; | |
import {applyMixins} from 'rxjs/util/applyMixins'; | |
class ElementDebugger implements AfterViewChecked { | |
ngAfterViewChecked() { | |
console.log(this); | |
} | |
} | |
export function debugCycle() { | |
return function (constructor:Function) { | |
applyMixins(constructor, [ElementDebugger]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment