Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Replace the mutation observer with the ngZone subscribe #180

Closed
sumitarora opened this issue Mar 8, 2016 · 0 comments
Closed

Replace the mutation observer with the ngZone subscribe #180

sumitarora opened this issue Mar 8, 2016 · 0 comments
Assignees

Comments

@sumitarora
Copy link
Member

Replace the mutation observer with the ngZone subscribe ( angular/angular#7045)

var ngRootEl = window.getAllAngularRootElements()[0];
var rootNgProbe = window.ng.probe(ngRootEl);
var appRef = rootNgProbe.inject(window.ng.probe.coreTokens.ApplicationRef);
appRef.tick();

var ngZone = rootNgProbe.inject(window.ng.probe.coreTokens.NgZone);
ngZone.onEventDone.subscribe(function() { console.log('Angular did some work'); });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants