Guest User

Untitled

a guest
Dec 10th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. class ApplicationRef {
  2. tick() {
  3. if (this._runningTick) {
  4. throw new Error('ApplicationRef.tick is called recursively');
  5. }
  6. const scope = ApplicationRef._tickScope();
  7. try {
  8. this._runningTick = true;
  9. this._views.forEach((view) => view.detectChanges());
  10. if (this._enforceNoNewChanges) {
  11. this._views.forEach((view) => view.checkNoChanges());
  12. }
  13. }
  14. catch (e) {
  15. // Attention: Don't rethrow as it could cancel subscriptions to Observables!
  16. this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));
  17. }
  18. finally {
  19. this._runningTick = false;
  20. wtfLeave(scope);
  21. }
  22. }
  23. }
Add Comment
Please, Sign In to add comment