Skip to content

Angular 6.1-beta.3 support #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions e2e/modal-navigation-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
}
},
"dependencies": {
"@angular/animations": "~6.0.0",
"@angular/common": "~6.0.0",
"@angular/compiler": "~6.0.0",
"@angular/core": "~6.0.0",
"@angular/forms": "~6.0.0",
"@angular/http": "~6.0.0",
"@angular/platform-browser": "~6.0.0",
"@angular/platform-browser-dynamic": "~6.0.0",
"@angular/router": "~6.0.0",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
Expand All @@ -31,7 +31,7 @@
},
"devDependencies": {
"@angular-devkit/core": "~0.7.0-beta.1",
"@angular/compiler-cli": "~6.0.0",
"@angular/compiler-cli": "~6.1.0-beta.3",
"@ngtools/webpack": "~6.1.0-beta.1",
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
Expand Down
16 changes: 8 additions & 8 deletions e2e/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"id": "org.nativescript.renderer"
},
"dependencies": {
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
Expand Down
18 changes: 9 additions & 9 deletions e2e/router-tab-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
}
},
"dependencies": {
"@angular/animations": "~6.0.0-rc.3",
"@angular/common": "~6.0.0-rc.3",
"@angular/compiler": "~6.0.0-rc.3",
"@angular/core": "~6.0.0-rc.3",
"@angular/forms": "~6.0.0-rc.3",
"@angular/http": "~6.0.0-rc.3",
"@angular/platform-browser": "~6.0.0-rc.3",
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
"@angular/router": "~6.0.0-rc.3",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
Expand Down
18 changes: 9 additions & 9 deletions e2e/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"id": "org.nativescript.router"
},
"dependencies": {
"@angular/animations": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
Expand Down
20 changes: 10 additions & 10 deletions e2e/single-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
}
},
"dependencies": {
"@angular/animations": "~6.0.0-rc.3",
"@angular/common": "~6.0.0-rc.3",
"@angular/compiler": "~6.0.0-rc.3",
"@angular/core": "~6.0.0-rc.3",
"@angular/forms": "~6.0.0-rc.3",
"@angular/http": "~6.0.0-rc.3",
"@angular/platform-browser": "~6.0.0-rc.3",
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
"@angular/router": "~6.0.0-rc.3",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
Expand All @@ -30,7 +30,7 @@
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/compiler-cli": "~6.0.0-rc.3",
"@angular/compiler-cli": "~6.1.0-beta.3",
"@ngtools/webpack": "~1.9.4",
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
Expand Down
6 changes: 6 additions & 0 deletions nativescript-angular/nativescript.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import {
SkipSelf,
} from "@angular/core";

import {
ViewportScroller,
ɵNullViewportScroller as NullViewportScroller,
} from "@angular/common";

import { NativeScriptCommonModule } from "./common";
import { NativeScriptRendererFactory } from "./renderer";
import { DetachedLoader } from "./common/detached-loader";
Expand All @@ -36,6 +41,7 @@ export function errorHandlerFactory() {
SystemJsNgModuleLoader,
{ provide: ErrorHandler, useFactory: errorHandlerFactory },
{ provide: RendererFactory2, useExisting: NativeScriptRendererFactory },
{ provide: ViewportScroller, useClass: NullViewportScroller },
],
entryComponents: [
DetachedLoader,
Expand Down
38 changes: 19 additions & 19 deletions nativescript-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-angular",
"version": "6.0.6",
"version": "6.1.0-beta.3",
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
"homepage": "https://www.nativescript.org/",
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",
Expand Down Expand Up @@ -43,30 +43,30 @@
"reflect-metadata": "^0.1.8"
},
"peerDependencies": {
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/router": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"rxjs": "~6.0.0 || >=6.1.0",
"tns-core-modules": "^4.0.0 || >4.0.0- || >4.1.0-",
"zone.js": "^0.8.26",
"typescript": "~2.7.2"
},
"devDependencies": {
"@angular/animations": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/compiler-cli": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/compiler-cli": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"codelyzer": "^4.3.0",
"rxjs": "~6.1.0",
"tns-core-modules": "next",
Expand Down
17 changes: 6 additions & 11 deletions nativescript-angular/platform-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,12 @@ export class NativeScriptSanitizer extends Sanitizer {
}
}

// Add a fake polyfill for the document object
(<any>global).document = (<any>global).document || {
getElementById: () => { return undefined; }
};

const doc = (<any>global).document;
doc.body = Object.assign(doc.body || {}, {
isOverride: true,
});

export class NativeScriptDocument {
// Required by the AnimationDriver
public body: any = {
isOverride: true,
};

createElement(tag: string) {
throw new Error("NativeScriptDocument is not DOM Document. There is no createElement() method.");
}
Expand All @@ -85,7 +80,7 @@ export class NativeScriptDocument {
export const COMMON_PROVIDERS = [
defaultPageFactoryProvider,
{ provide: Sanitizer, useClass: NativeScriptSanitizer, deps: [] },
{ provide: DOCUMENT, useValue: doc },
{ provide: DOCUMENT, useClass: NativeScriptDocument, deps: [] },
];

export class NativeScriptPlatformRef extends PlatformRef {
Expand Down
5 changes: 0 additions & 5 deletions nativescript-angular/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import {
ɵplatformCoreDynamic as platformCoreDynamic
} from "@angular/platform-browser-dynamic";

import {
ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS as INTERNAL_BROWSER_PLATFORM_PROVIDERS
} from "@angular/platform-browser";

import {
COMPILER_OPTIONS,
PlatformRef,
Expand All @@ -47,7 +43,6 @@ import { NativeScriptElementSchemaRegistry } from "./schema-registry";
import { FileSystemResourceLoader } from "./resource-loader";

export const NS_COMPILER_PROVIDERS: StaticProvider[] = [
INTERNAL_BROWSER_PLATFORM_PROVIDERS,
{
provide: COMPILER_OPTIONS,
useValue: {
Expand Down
18 changes: 9 additions & 9 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
],
"homepage": "http://nativescript.org",
"dependencies": {
"@angular/animations": "~6.0.0-rc.3",
"@angular/common": "~6.0.0-rc.3",
"@angular/compiler": "~6.0.0-rc.3",
"@angular/core": "~6.0.0-rc.3",
"@angular/forms": "~6.0.0-rc.3",
"@angular/http": "~6.0.0-rc.3",
"@angular/platform-browser": "~6.0.0-rc.3",
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
"@angular/router": "~6.0.0-rc.3",
"@angular/animations": "~6.1.0-beta.3",
"@angular/common": "~6.1.0-beta.3",
"@angular/compiler": "~6.1.0-beta.3",
"@angular/core": "~6.1.0-beta.3",
"@angular/forms": "~6.1.0-beta.3",
"@angular/http": "~6.1.0-beta.3",
"@angular/platform-browser": "~6.1.0-beta.3",
"@angular/platform-browser-dynamic": "~6.1.0-beta.3",
"@angular/router": "~6.1.0-beta.3",
"nativescript-angular": "../nativescript-angular",
"nativescript-unit-test-runner": "^0.3.4",
"rxjs": "~6.0.0-rc.1",
Expand Down