Skip to content

Commit 0adb766

Browse files
committed
Merge branch 'beta-0'
2 parents f62b7e3 + 9310c0e commit 0adb766

File tree

11 files changed

+147
-130
lines changed

11 files changed

+147
-130
lines changed

deps/angular

Submodule angular updated 745 files

ng-sample/app/benchmark.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
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, NgIf, NgFor} from 'angular2/angular2';
4+
import {Inject, Component, View} from 'angular2/core';
55
import {ApplicationRef} from 'angular2/src/core/application_ref';
66
import * as profiling from './profiling';
77

88
@Component({selector: 'tree', inputs: ['data']})
99
@View({
10-
directives: [TreeComponent, NgIf],
10+
directives: [TreeComponent],
1111
template:
1212
`<StackLayout>
1313
<Label [text]="data.value"></Label>
14-
<StackLayout *ng-if="data.right != null">
14+
<StackLayout *ngIf="data.right != null">
1515
<tree [data]='data.right'></tree>
1616
</StackLayout>
17-
<StackLayout *ng-if="data.left != null">
17+
<StackLayout *ngIf="data.left != null">
1818
<tree [data]='data.left'></tree>
1919
</StackLayout>
2020
</StackLayout>
@@ -28,7 +28,7 @@ class TreeComponent {
2828
selector: 'benchmark',
2929
})
3030
@View({
31-
directives: [NgIf, NgFor, TreeComponent],
31+
directives: [TreeComponent],
3232
template: `
3333
<StackLayout>
3434
<Label text='Benchmark!' fontSize='20' verticalAlignment='center' padding='20'></Label>

ng-sample/app/renderer-test.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Inject, Component, View, NgIf, NgFor} from 'angular2/angular2';
1+
import {Inject, Component, View} from 'angular2/core';
22

33
@Component({
44
selector: 'templated-component',
@@ -8,10 +8,8 @@ export class TemplatedComponent {
88
}
99

1010
@Component({
11-
selector: 'renderer-test'
12-
})
13-
@View({
14-
directives: [NgIf, NgFor, TemplatedComponent],
11+
selector: 'renderer-test',
12+
directives: [TemplatedComponent],
1513
template: `
1614
<TabView>
1715
<TabView.items>
@@ -23,10 +21,10 @@ export class TemplatedComponent {
2321
<TextField #name text='John' fontSize='20' padding='20'></TextField>
2422
<Button [text]='buttonText' (tap)='onSave($event, name.text, $el)'></Button>
2523
<Button text='Toggle details' (tap)='onToggleDetails()'></Button>
26-
<TextView *ng-if='showDetails' [text]='detailsText'></TextView>
24+
<TextView *ngIf='showDetails' [text]='detailsText'></TextView>
2725
<Label text='==============================' fontSize='20'></Label>
28-
<StackLayout #more *ng-if='showDetails' orientation='vertical'>
29-
<TextField *ng-for='#detailLine of detailLines' [text]='detailLine'></TextField>
26+
<StackLayout #more *ngIf='showDetails' orientation='vertical'>
27+
<TextField *ngFor='#detailLine of detailLines' [text]='detailLine'></TextField>
3028
</StackLayout>
3129
<Label text='==============================' fontSize='20'></Label>
3230
</StackLayout>
@@ -56,7 +54,7 @@ export class RendererTest {
5654
this.moreDetailsText = 'More details:';
5755

5856
this.detailLines = [
59-
"ng-for inside a ng-if",
57+
"ngFor inside a ngIf",
6058
"Street address",
6159
"Country, city",
6260
];

ng-sample/package.json

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
{
2-
"name": "tns-template-hello-world",
3-
"main": "app.js",
4-
"version": "1.1.0",
5-
"author": "Telerik <support@telerik.com>",
6-
"description": "Nativescript hello-world project template",
7-
"license": "BSD",
8-
"keywords": [
9-
"telerik",
10-
"mobile",
11-
"nativescript",
12-
"{N}",
13-
"tns",
14-
"appbuilder",
15-
"template"
16-
],
17-
"repository": {
18-
"type": "git",
19-
"url": "git://github.com/NativeScript/template-hello-world.git"
20-
},
21-
"bugs": {
22-
"url": "https://github.com/NativeScript/template-hello-world/issues"
23-
},
24-
"homepage": "https://github.com/NativeScript/template-hello-world",
25-
"dependencies": {
26-
"@reactivex/rxjs": "5.0.0-alpha.7",
27-
"parse5": "1.4.2",
28-
"punycode": "1.3.2",
29-
"querystring": "0.2.0",
30-
"url": "0.10.3",
31-
"reflect-metadata": "0.1.2",
32-
"zone.js": "0.5.8"
33-
},
34-
"devDependencies": {
35-
"grunt": "0.4.5",
36-
"grunt-contrib-clean": "0.6.0",
37-
"grunt-contrib-copy": "0.8.0",
38-
"grunt-shell": "1.1.2",
39-
"grunt-ts": "5.0.0-beta.5",
40-
"nativescript-dev-typescript": "^0.2.2",
41-
"shelljs": "^0.5.3",
42-
"typescript": "^1.7.3",
43-
"webpack": "^1.12.9"
44-
},
45-
"nativescript": {
46-
"id": "org.nativescript.ngsample",
47-
"tns-android": {
48-
"version": "1.5.0"
49-
}
50-
}
51-
}
2+
"name": "tns-template-hello-world",
3+
"main": "app.js",
4+
"version": "1.1.0",
5+
"author": "Telerik <support@telerik.com>",
6+
"description": "Nativescript hello-world project template",
7+
"license": "BSD",
8+
"keywords": [
9+
"telerik",
10+
"mobile",
11+
"nativescript",
12+
"{N}",
13+
"tns",
14+
"appbuilder",
15+
"template"
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "git://github.com/NativeScript/template-hello-world.git"
20+
},
21+
"bugs": {
22+
"url": "https://github.com/NativeScript/template-hello-world/issues"
23+
},
24+
"homepage": "https://github.com/NativeScript/template-hello-world",
25+
"dependencies": {
26+
"parse5": "1.4.2",
27+
"punycode": "1.3.2",
28+
"querystring": "0.2.0",
29+
"url": "0.10.3",
30+
"reflect-metadata": "0.1.2",
31+
"rxjs": "5.0.0-beta.0",
32+
"zone.js": "0.5.10"
33+
},
34+
"devDependencies": {
35+
"grunt": "0.4.5",
36+
"grunt-contrib-clean": "0.6.0",
37+
"grunt-contrib-copy": "0.8.0",
38+
"grunt-shell": "1.1.2",
39+
"grunt-ts": "5.0.0-beta.5",
40+
"nativescript-dev-typescript": "^0.2.2",
41+
"shelljs": "^0.5.3",
42+
"typescript": "^1.7.5",
43+
"webpack": "^1.12.9"
44+
},
45+
"nativescript": {
46+
"id": "org.nativescript.ngsample",
47+
"tns-android": {
48+
"version": "1.5.1"
49+
}
50+
}
51+
}

ng-sample/tsconfig.json

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2-
"compilerOptions": {
3-
"outDir": "app",
4-
"rootDir": "app",
5-
"module": "commonjs",
6-
"target": "es5",
7-
"inlineSourceMap": true,
8-
"experimentalDecorators": true,
9-
"removeComments": false,
10-
"emitDecoratorMetadata": true,
11-
"noEmitOnError": true
12-
},
13-
"files": [
14-
"app/app.ts",
15-
"app/benchmark.ts",
16-
"app/global.d.ts",
17-
"app/main-page.ts",
18-
"app/main-view-model.ts",
19-
"app/nativescript-angular/application.d.ts",
20-
"app/nativescript-angular/application.ts",
21-
"app/nativescript-angular/dom_adapter.ts",
22-
"app/nativescript-angular/element-registry.d.ts",
23-
"app/nativescript-angular/element-registry.ts",
24-
"app/nativescript-angular/polyfills/array.ts",
25-
"app/nativescript-angular/renderer.ts",
26-
"app/nativescript-angular/view_node.ts",
27-
"app/nativescript-angular/xhr.ts",
28-
"app/nativescript-angular/zone.ts",
29-
"app/nativescript-angular/zone_patch.ts",
30-
"app/profiling.ts",
31-
"app/renderer-test.ts",
32-
"app/starter.ts",
33-
"node_modules/tns-core-modules/tns-core-modules.d.ts"
34-
],
35-
"filesGlob": [
36-
"node_modules/tns-core-modules/tns-core-modules.d.ts",
37-
"app/**/*.ts"
38-
]
2+
"compilerOptions": {
3+
"outDir": "app",
4+
"rootDir": "app",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"inlineSourceMap": true,
8+
"experimentalDecorators": true,
9+
"removeComments": false,
10+
"emitDecoratorMetadata": true,
11+
"noEmitOnError": true
12+
},
13+
"files": [
14+
"app/app.ts",
15+
"app/benchmark.ts",
16+
"app/global.d.ts",
17+
"app/main-page.ts",
18+
"app/main-view-model.ts",
19+
"app/nativescript-angular/application.d.ts",
20+
"app/nativescript-angular/application.ts",
21+
"app/nativescript-angular/dom_adapter.ts",
22+
"app/nativescript-angular/element-registry.d.ts",
23+
"app/nativescript-angular/element-registry.ts",
24+
"app/nativescript-angular/polyfills/array.ts",
25+
"app/nativescript-angular/renderer.ts",
26+
"app/nativescript-angular/view_node.ts",
27+
"app/nativescript-angular/xhr.ts",
28+
"app/nativescript-angular/zone.ts",
29+
"app/nativescript-angular/zone_patch.ts",
30+
"app/profiling.ts",
31+
"app/renderer-test.ts",
32+
"app/starter.ts",
33+
"node_modules/tns-core-modules/tns-core-modules.d.ts"
34+
],
35+
"filesGlob": [
36+
"node_modules/tns-core-modules/tns-core-modules.d.ts",
37+
"app/**/*.ts"
38+
]
3939
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-angular",
3-
"version": "0.0.17",
3+
"version": "0.0.18",
44
"description": "",
55
"homepage": "http://www.telerik.com",
66
"bugs": "http://www.telerik.com",
@@ -14,14 +14,14 @@
1414
},
1515
"scripts": {},
1616
"dependencies": {
17-
"angular2": "2.0.0-alpha.46",
18-
"@reactivex/rxjs": "5.0.0-alpha.7",
17+
"angular2": "2.0.0-beta.0",
1918
"parse5": "1.4.2",
2019
"punycode": "1.3.2",
2120
"querystring": "0.2.0",
2221
"url": "0.10.3",
2322
"reflect-metadata": "0.1.2",
24-
"zone.js": "0.5.8"
23+
"rxjs": "5.0.0-beta.0",
24+
"zone.js": "0.5.10"
2525
},
2626
"devDependencies": {
2727
"grunt": "0.4.5",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Type, ApplicationRef, Provider } from 'angular2/angular2';
1+
import { Type, ApplicationRef, Provider } from 'angular2/core';
22

33
export type BindingArray = Array<Type | Provider | Array<any>>;
44
export function nativeScriptBootstrap(appComponentType: any, componentInjectableBindings?: BindingArray): Promise<ApplicationRef>;

src/nativescript-angular/application.ts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,49 @@ import './polyfills/array';
33
import './zone';
44
import {isPresent, Type} from 'angular2/src/facade/lang';
55
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
6-
import {ComponentRef} from 'angular2/src/core/linker/dynamic_component_loader';
6+
import {platform, ComponentRef, PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/core';
77
import {bind, provide, Provider} from 'angular2/src/core/di';
8-
import {DOM} from 'angular2/src/core/dom/dom_adapter';
8+
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
99

1010
import {Renderer} from 'angular2/src/core/render/api';
1111
import {NativeScriptRenderer} from './renderer';
1212
import {NativeScriptDomAdapter} from './dom_adapter';
1313
import {XHR} from 'angular2/src/compiler/xhr';
1414
import {FileSystemXHR} from './xhr';
15-
import {Parse5DomAdapter} from 'angular2/src/core/dom/parse5_adapter';
15+
import {Parse5DomAdapter} from 'angular2/src/platform/server/parse5_adapter';
16+
import {ExceptionHandler} from 'angular2/src/facade/exception_handler';
17+
import {APPLICATION_COMMON_PROVIDERS} from 'angular2/src/core/application_common_providers';
18+
import {COMPILER_PROVIDERS} from 'angular2/src/compiler/compiler';
19+
import {PLATFORM_COMMON_PROVIDERS} from 'angular2/src/core/platform_common_providers';
20+
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common";
1621

17-
import {bootstrap as angularBootstrap} from 'angular2/src/core/application';
18-
import {commonBootstrap} from 'angular2/src/core/application_common';
22+
import {bootstrap as angularBootstrap} from 'angular2/bootstrap';
1923

20-
21-
export type BindingArray = Array<Type | Provider | any[]>;
24+
export type ProviderArray = Array<Type | Provider | any[]>;
2225

2326
export function nativeScriptBootstrap(appComponentType: any,
24-
componentInjectableBindings: BindingArray = null): Promise<ComponentRef> {
27+
customProviders: ProviderArray = null): Promise<ComponentRef> {
2528
NativeScriptDomAdapter.makeCurrent();
2629

27-
let nativeScriptBindings: BindingArray = [
30+
let nativeScriptProviders: ProviderArray = [
2831
NativeScriptRenderer,
2932
provide(Renderer, {useClass: NativeScriptRenderer}),
3033
provide(XHR, {useClass: FileSystemXHR}),
34+
provide(ExceptionHandler, {useFactory: () => new ExceptionHandler(DOM, true), deps: []}),
35+
36+
provide(PLATFORM_PIPES, {useValue: COMMON_PIPES, multi: true}),
37+
provide(PLATFORM_DIRECTIVES, {useValue: COMMON_DIRECTIVES, multi: true}),
38+
39+
APPLICATION_COMMON_PROVIDERS,
40+
COMPILER_PROVIDERS,
41+
PLATFORM_COMMON_PROVIDERS,
42+
FORM_PROVIDERS,
3143
];
32-
var bindings = [nativeScriptBindings];
33-
if (isPresent(componentInjectableBindings)) {
34-
bindings.push(componentInjectableBindings);
44+
45+
var appProviders = [];
46+
if (isPresent(customProviders)) {
47+
appProviders.push(customProviders);
3548
}
3649

37-
return angularBootstrap(appComponentType, bindings)
50+
return platform(nativeScriptProviders).application(appProviders).bootstrap(appComponentType);
3851
}

src/nativescript-angular/dom_adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Parse5DomAdapter} from 'angular2/src/core/dom/parse5_adapter';
2-
import {setRootDomAdapter} from 'angular2/src/core/dom/dom_adapter';
1+
import {Parse5DomAdapter} from 'angular2/src/platform/server/parse5_adapter';
2+
import {setRootDomAdapter} from 'angular2/src/platform/dom/dom_adapter';
33
import {Type} from 'angular2/src/facade/lang';
44

55
export class NativeScriptDomAdapter extends Parse5DomAdapter {

0 commit comments

Comments
 (0)