Questions tagged [angular2-zone]
6 questions
5
votes
1 answer
Prerendering failed because of NgZone reference error
I am having trouble with implementing of NgZones. I get this error even though I have defined NgZone. "NodeInvocationException: Prerendering failed because of error: ReferenceError: NgZone is not defined"
This is my app.error-handle.ts file, where I…

Sushi
- 77
- 1
- 5
2
votes
3 answers
Angular2 beta 11 Cannot read property zone of undefined
I am trying to setup browser-sync on my gulp pipeline for development but I can't seem to get the reload working. A browser tab is opened when I run gulp start but reload doesn't cause subsequent browser refresh.
Steps that I follow in my gulpfile…

stripathi
- 766
- 11
- 23
1
vote
0 answers
How to cancel the macroTask and microTask in zone.js?
I want to do some asynchronous work by using zone.js. Mostly it will be zone.js microTask. When I got the desired output, I wish to cancel all the running and scheduled tasks. I am a bit confused about where to cancel the tasks.
Here my code…

Gokulakannan T
- 586
- 4
- 14
1
vote
1 answer
angular 2 downgrade component: Why the constructor params bring this error: (SystemJS) Can't resolve all parameters for (?)
See for example this line:
constructor(private elementRef: ElementRef, private zone: NgZone) {}
I need to remove the parmas from the constructor in order for the downgrade to work with no error. Else I get
(SystemJS) Can't resolve all…

AngularOne
- 2,760
- 6
- 32
- 46
1
vote
1 answer
Can't understand zone.js example
Here's the code demonstrating zone.js capabilities from here:
Zone.current.fork({}).run(function () {
Zone.current.inTheZone = true;
setTimeout(function () {
console.log('in the zone: ' + !!Zone.current.inTheZone);
},…

Max Koretskyi
- 101,079
- 60
- 333
- 488
1
vote
1 answer
JavaScript Listener - Angular 2 zone
I have a JavaScript Listener within a Google Maps object:
map.data.addListener('click', (event) => {
var mapElement = event.feature.getProperty('type');
switch(mapElement){
case 'cameras':
var cameraID =…

dandev91
- 1,691
- 3
- 22
- 34