Skip to content

Commit 93e8fef

Browse files
committed
Upgrade to RC1: router -> router-deprecated
1 parent 48654ed commit 93e8fef

File tree

19 files changed

+254
-257
lines changed

19 files changed

+254
-257
lines changed

ng-sample/app/app.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ import {ModalTest} from "./examples/modal/modal-test";
2727
import {PlatfromDirectivesTest} from "./examples/platform-directives/platform-directives-test";
2828
import {RouterOutletTest} from "./examples/navigation/router-outlet-test";
2929

30-
nativeScriptBootstrap(RendererTest).then((compRef) => {
31-
console.log("nativeScriptBootstrap resloved: " + compRef);
32-
}).catch((e) => {
33-
console.log("nativeScriptBootstrap error: " + e);
34-
});
30+
nativeScriptBootstrap(RendererTest);
3531
//nativeScriptBootstrap(Benchmark);
3632
//nativeScriptBootstrap(ListTest);
3733
//nativeScriptBootstrap(ListTestAsync);

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

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

ng-sample/app/examples/navigation/nav-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Component} from '@angular/core';
22
import {ROUTER_DIRECTIVES, Router, OnActivate, OnDeactivate, CanReuse, OnReuse,
3-
RouteParams, ComponentInstruction, RouteConfig } from '@angular/router';
3+
RouteParams, ComponentInstruction, RouteConfig } from '@angular/router-deprecated';
44
import {Location, LocationStrategy} from '@angular/common';
55
import {topmost} from "ui/frame";
66
import {Page} from "ui/page";

ng-sample/app/examples/navigation/navigation-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component} from '@angular/core';
2-
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, ComponentInstruction} from '@angular/router';
2+
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, ComponentInstruction} from '@angular/router-deprecated';
33

44
import {NavComponent} from "./nav-component";
55
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "../../nativescript-angular/router/ns-router";

ng-sample/app/examples/navigation/router-outlet-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component} from '@angular/core';
2-
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, ComponentInstruction, RouteParams} from '@angular/router';
2+
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, ComponentInstruction, RouteParams} from '@angular/router-deprecated';
33
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "../../nativescript-angular/router/ns-router";
44

55
@Component({

ng-sample/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@
2525
"dependencies": {
2626
"tns-core-modules": "^2.0.0",
2727
"nativescript-intl": "^0.0.2",
28-
"@angular/common": "0.0.0-0",
29-
"@angular/compiler": "0.0.0-0",
30-
"@angular/core": "0.0.0-0",
31-
"@angular/router": "0.0.0-0",
32-
"@angular/platform-browser": "0.0.0-0",
33-
"@angular/platform-browser-dynamic": "0.0.0-0",
34-
"@angular/platform-server": "0.0.0-0",
28+
"@angular/common": "2.0.0-rc.1",
29+
"@angular/compiler": "2.0.0-rc.1",
30+
"@angular/core": "2.0.0-rc.1",
31+
"@angular/router-deprecated": "2.0.0-rc.1",
32+
"@angular/platform-browser": "2.0.0-rc.1",
33+
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
34+
"@angular/platform-server": "2.0.0-rc.1",
3535
"reflect-metadata": "^0.1.3",
36-
"rxjs": "5.0.0-beta.2",
36+
"rxjs": "5.0.0-beta.6",
3737
"zone.js": "^0.6.12",
3838
"parse5": "1.4.2",
3939
"punycode": "1.3.2",
4040
"querystring": "0.2.0",
4141
"url": "0.10.3"
4242
},
4343
"devDependencies": {
44-
"babel-traverse": "6.7.6",
45-
"babel-types": "6.7.7",
46-
"babylon": "6.7.0",
44+
"babel-traverse": "6.8.0",
45+
"babel-types": "6.8.1",
46+
"babylon": "6.8.0",
4747
"filewalker": "0.1.2",
4848
"grunt": "0.4.5",
4949
"grunt-contrib-clean": "0.6.0",

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
"dependencies": {
1717
"tns-core-modules": "^2.0.0",
1818
"nativescript-intl": "^0.0.2",
19-
"@angular/common": "0.0.0-0",
20-
"@angular/compiler": "0.0.0-0",
21-
"@angular/core": "0.0.0-0",
22-
"@angular/router": "0.0.0-0",
23-
"@angular/platform-browser": "0.0.0-0",
24-
"@angular/platform-browser-dynamic": "0.0.0-0",
25-
"@angular/platform-server": "0.0.0-0",
19+
"@angular/common": "2.0.0-rc.1",
20+
"@angular/compiler": "2.0.0-rc.1",
21+
"@angular/core": "2.0.0-rc.1",
22+
"@angular/router-deprecated": "2.0.0-rc.1",
23+
"@angular/platform-browser": "2.0.0-rc.1",
24+
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
25+
"@angular/platform-server": "2.0.0-rc.1",
2626
"reflect-metadata": "^0.1.3",
27-
"rxjs": "5.0.0-beta.2",
27+
"rxjs": "5.0.0-beta.6",
2828
"zone.js": "^0.6.12",
2929
"parse5": "1.4.2",
3030
"punycode": "1.3.2",
@@ -40,7 +40,7 @@
4040
"grunt-env": "0.4.4",
4141
"grunt-ts": "5.0.0-beta.5",
4242
"shelljs": "^0.5.3",
43-
"typescript": "1.8.2"
43+
"typescript": "^1.8.10"
4444
},
4545
"peerDependencies": {
4646
"tns-core-modules": ">=2.0.0 || >=2.0.0-2016 || >=2.0.0-angular-4"

src/nativescript-angular/common/detached-loader.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import {DynamicComponentLoader, ComponentRef, ViewContainerRef, Component, Type, ViewChild} from '@angular/core';
22

3+
type AnyComponentRef = ComponentRef<any>;
34
interface PendingLoadEntry {
45
componentType: Type;
5-
resolveCallback: (ComponentRef) => void;
6+
resolveCallback: (AnyComponentRef) => void;
67
}
78

89
/**
@@ -34,11 +35,11 @@ export class DetachedLoader {
3435
});
3536
}
3637

37-
private loadInLocation(componentType: Type): Promise<ComponentRef> {
38+
private loadInLocation(componentType: Type): Promise<ComponentRef<any>> {
3839
return this.loader.loadNextToLocation(componentType, this.containerRef);
3940
}
4041

41-
public loadComponent(componentType: Type): Promise<ComponentRef> {
42+
public loadComponent(componentType: Type): Promise<ComponentRef<any>> {
4243
// Check if called before placeholder is initialized.
4344
// Delay load if so.
4445
if (this.viewLoaded) {

src/nativescript-angular/directives/dialogs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class ModalDialogService {
3535
return new Promise((resove, reject) => {
3636
const page = new Page();
3737

38-
var detachedLoaderRef: ComponentRef;
38+
var detachedLoaderRef: ComponentRef<DetachedLoader>;
3939
const closeCallback = (...args) => {
4040
resove.apply(undefined, args);
4141
page.closeModal();

src/nativescript-angular/directives/tab-view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class TabViewItemDirective {
3939

4040
constructor(
4141
private owner: TabViewDirective,
42-
private templateRef: TemplateRef,
42+
private templateRef: TemplateRef<any>,
4343
private viewContainer: ViewContainerRef
4444
) {
4545
}

0 commit comments

Comments
 (0)