Skip to content

Commit 9613a7e

Browse files
committed
Update zone.js imports and tns-core-modules dependency (needed for zone.js)
1 parent 1205173 commit 9613a7e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"typescript": "1.8.2"
3838
},
3939
"peerDependencies": {
40-
"tns-core-modules": ">=2.0.0 || >=2.0.0-2016 || >=2.0.0-angular-2"
40+
"tns-core-modules": ">=2.0.0 || >=2.0.0-2016 || >=2.0.0-angular-3"
4141
},
4242
"nativescript": {}
4343
}

src/nativescript-angular/application.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//Import globals before the zone, so the latter can patch the global functions
2-
import 'globals';
3-
41
//prevent a crash in zone patches. pretend we're node.js
52
global.process = {};
63
const oldToString = Object.prototype.toString;
@@ -10,6 +7,10 @@ Object.prototype.toString = function() {
107
import "zone.js/dist/zone.js"
118
Object.prototype.toString = oldToString;
129
delete global.process;
10+
//
11+
//Import globals after the zone, so the latter can't patch everything there.
12+
//The patchables should already be zone-aware already.
13+
import 'globals';
1314

1415
import 'reflect-metadata';
1516
import './polyfills/array';

0 commit comments

Comments
 (0)