Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 77b9437

Browse files
committed
Merge pull request #162 from NativeScript/beta-14
chore: update to beta.14
2 parents 55f16bb + 0029fa1 commit 77b9437

File tree

8 files changed

+36
-46
lines changed

8 files changed

+36
-46
lines changed

‎ng-sample/app/examples/action-bar/action-bar-test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component} from 'angular2/core';
22
import {RouteConfig} from 'angular2/router';
33
import { Page} from "ui/page";
44
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "../../nativescript-angular/router/ns-router";
5-
import {NS_DIRECTIVES} from "../../nativescript-angular/directives/ns-directives";
5+
import {NS_DIRECTIVES} from "../../nativescript-angular/directives";
66

77
@Component({
88
selector: "first",

‎ng-sample/app/performance/benchmark.ts‎

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import {StackLayout} from 'ui/layouts/stack-layout';
22
import {Button} from 'ui/button';
33
import {Label} from 'ui/label';
4-
import {Inject, Component,View} from 'angular2/core';
4+
import {Inject, Component} from 'angular2/core';
55
import {ApplicationRef} from 'angular2/src/core/application_ref';
66
import * as profiling from './profiling';
77

8-
@Component({selector: 'tree', inputs: ['data']})
9-
@View({
10-
directives: [TreeComponent],
11-
template:
12-
`<StackLayout>
8+
@Component({
9+
selector: 'tree',
10+
inputs: ['data'],
11+
directives: [TreeComponent],
12+
template:
13+
`<StackLayout>
1314
<Label [text]="data.value"></Label>
1415
<StackLayout *ngIf="data.right != null">
1516
<tree [data]='data.right'></tree>
@@ -21,15 +22,13 @@ import * as profiling from './profiling';
2122
`
2223
})
2324
class TreeComponent {
24-
data: TreeNode;
25+
data: TreeNode;
2526
}
2627

2728
@Component({
28-
selector: 'benchmark',
29-
})
30-
@View({
29+
selector: 'benchmark',
3130
directives: [TreeComponent],
32-
template: `
31+
template: `
3332
<StackLayout>
3433
<Label text='Benchmark!' fontSize='20' verticalAlignment='center' padding='20'></Label>
3534
<Button text="Baseline test" (tap)="baselineTest(baseline)"></Button>
@@ -88,29 +87,29 @@ export class Benchmark {
8887

8988
private createBaselineDom() {
9089
var values = this.count++ % 2 == 0 ? ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*'] :
91-
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', '-'];
90+
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', '-'];
9291
this.initDataBaseline = buildTree(this.maxDepth, values, 0);
9392
this.appRef.tick();
9493
}
9594

9695
private createNgDom() {
9796
var values = this.count++ % 2 == 0 ? ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*'] :
98-
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', '-'];
97+
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', '-'];
9998
this.initDataNg = buildTree(this.maxDepth, values, 0);
10099
this.appRef.tick();
101100
}
102101
}
103102

104103

105104
export class TreeNode {
106-
value: string;
107-
left: TreeNode;
108-
right: TreeNode;
109-
constructor(value, left, right) {
110-
this.value = value;
111-
this.left = left;
112-
this.right = right;
113-
}
105+
value: string;
106+
left: TreeNode;
107+
right: TreeNode;
108+
constructor(value, left, right) {
109+
this.value = value;
110+
this.left = left;
111+
this.right = right;
112+
}
114113
}
115114

116115
var nodes = 0;

‎ng-sample/package.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323
},
2424
"homepage": "https://github.com/NativeScript/template-hello-world",
2525
"dependencies": {
26-
"tns-core-modules": "^2.0.0-angular-3",
26+
"tns-core-modules": "^2.0.0-angular-4",
2727
"nativescript-intl": "^0.0.2",
28-
"angular2": "2.0.0-beta.9",
28+
"angular2": "2.0.0-beta.14",
29+
"es6-shim": "^0.35.0",
2930
"parse5": "1.4.2",
3031
"punycode": "1.3.2",
3132
"querystring": "0.2.0",
3233
"url": "0.10.3",
3334
"reflect-metadata": "0.1.2",
3435
"rxjs": "5.0.0-beta.2",
35-
"zone.js": "0.5.15"
36+
"zone.js": "^0.6.6"
3637
},
3738
"devDependencies": {
3839
"grunt": "0.4.5",

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"scripts": {},
1616
"dependencies": {
1717
"nativescript-intl": "^0.0.2",
18-
"angular2": "2.0.0-beta.9",
19-
"es6-shim": "^0.33.3",
18+
"angular2": "2.0.0-beta.14",
19+
"es6-shim": "^0.35.0",
2020
"parse5": "1.4.2",
2121
"punycode": "1.3.2",
2222
"querystring": "0.2.0",
2323
"url": "0.10.3",
2424
"reflect-metadata": "0.1.2",
2525
"rxjs": "5.0.0-beta.2",
26-
"zone.js": "0.5.15"
26+
"zone.js": "^0.6.6"
2727
},
2828
"devDependencies": {
2929
"grunt": "0.4.5",
@@ -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-3"
40+
"tns-core-modules": ">=2.0.0 || >=2.0.0-2016 || >=2.0.0-angular-4"
4141
},
4242
"nativescript": {}
4343
}

‎src/nativescript-angular/application.ts‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
//prevent a crash in zone patches. pretend we're node.js
2-
global.process = {};
3-
const oldToString = Object.prototype.toString;
4-
Object.prototype.toString = function() {
5-
return "[object process]";
6-
}
7-
import "zone.js/dist/zone.js"
8-
Object.prototype.toString = oldToString;
9-
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.
131
import 'globals';
2+
import "zone.js/dist/zone-node"
143

154
import 'reflect-metadata';
165
import './polyfills/array';

‎src/nativescript-angular/renderer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class NativeScriptRenderer extends Renderer {
216216

217217
public listen(renderElement: NgView, eventName: string, callback: Function): Function {
218218
traceLog('NativeScriptRenderer.listen: ' + eventName);
219-
let zonedCallback = (<any>global).zone.bind(callback);
219+
let zonedCallback = (<any>global).Zone.current.wrap(callback);
220220
renderElement.on(eventName, zonedCallback);
221221
return () => renderElement.off(eventName, zonedCallback);
222222
}

‎src/nativescript-angular/router/page-router-outlet.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class PageRouterOutlet extends RouterOutlet {
170170
resolve(componentRef)
171171
});
172172

173-
page.on('navigatingFrom', (<any>global).zone.bind((args: NavigatedData) => {
173+
page.on('navigatingFrom', (<any>global).Zone.current.wrap((args: NavigatedData) => {
174174
if (args.isBackNavigation) {
175175
this.location.beginBackPageNavigation();
176176
this.location.back();

‎tests/package.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@
3030
},
3131
"homepage": "http://nativescript.org",
3232
"dependencies": {
33-
"tns-core-modules": "2.0.0-angular-3",
33+
"tns-core-modules": "^2.0.0-angular-4",
3434
"nativescript-intl": "^0.0.2",
35-
"angular2": "2.0.0-beta.9",
35+
"angular2": "2.0.0-beta.14",
36+
"es6-shim": "^0.35.0",
3637
"nativescript-unit-test-runner": "^0.3.3",
3738
"parse5": "1.4.2",
3839
"punycode": "1.3.2",
3940
"querystring": "0.2.0",
4041
"reflect-metadata": "0.1.2",
4142
"url": "0.10.3",
4243
"rxjs": "5.0.0-beta.2",
43-
"zone.js": "0.5.15"
44+
"zone.js": "^0.6.6"
4445
},
4546
"devDependencies": {
4647
"chai": "^3.5.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /