Skip to content

Commit

Permalink
fix(@schematics/angular): import zone related flags in other files
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion committed Dec 4, 2018
1 parent f7f693c commit b8cb448
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 1 addition & 15 deletions packages/schematics/angular/application/files/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,10 @@
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/

// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import './zone-flags'; // import zone related flags.
import 'zone.js/dist/zone'; // Included with Angular CLI.


Expand Down
14 changes: 14 additions & 0 deletions packages/schematics/angular/application/files/src/zone-flags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/

// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;

0 comments on commit b8cb448

Please sign in to comment.