Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ src/nativescript-angular/**/*.js
.nvm

tests/app/**/*.js
tests/app/global.d.ts
tests/test-output.txt
tests/app/nativescript-angular
tests/app/global.d.ts
Expand Down
14 changes: 7 additions & 7 deletions ng-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@
},
"homepage": "https://github.com/NativeScript/template-hello-world",
"dependencies": {
"tns-core-modules": "^1.6.0",
"angular2": "2.0.0-beta.6",
"tns-core-modules": "^1.7.0-angular-0",
"angular2": "2.0.0-beta.7",
"parse5": "1.4.2",
"punycode": "1.3.2",
"querystring": "0.2.0",
"url": "0.10.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.14"
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-copy": "0.8.0",
"grunt-shell": "1.1.2",
"grunt-ts": "5.0.0-beta.5",
"nativescript-dev-typescript": "^0.2.2",
"nativescript-dev-typescript": "^0.3.1",
"shelljs": "^0.5.3",
"typescript": "^1.7.5",
"typescript": "1.8.2",
"webpack": "^1.12.9"
},
"nativescript": {
"id": "org.nativescript.ngsample",
"tns-android": {
"version": "1.6.0"
"version": "1.6.2"
}
}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-angular",
"version": "0.0.33",
"version": "0.0.34",
"description": "",
"homepage": "http://www.telerik.com",
"bugs": "http://www.telerik.com",
Expand All @@ -14,16 +14,16 @@
},
"scripts": {},
"dependencies": {
"tns-core-modules": "^1.6.1-angular-0",
"angular2": "2.0.0-beta.6",
"tns-core-modules": "^1.7.0-angular-0",
"angular2": "2.0.0-beta.7",
"es6-shim": "^0.33.3",
"parse5": "1.4.2",
"punycode": "1.3.2",
"querystring": "0.2.0",
"url": "0.10.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.14"
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"grunt": "0.4.5",
Expand All @@ -34,6 +34,6 @@
"grunt-env": "0.4.4",
"grunt-ts": "5.0.0-beta.5",
"shelljs": "^0.5.3",
"typescript": "1.7.3"
"typescript": "1.8.2"
}
}
15 changes: 10 additions & 5 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/// <reference path="../node_modules/tns-core-modules/tns-core-modules.d.ts" />

interface Map<K, V> {
keys(): Array<K>;
values(): Array<V>;
//Compatibility interfaces for rxjs

interface IteratorResult<T> {
done: boolean;
value?: T;
}

declare type MapConstructor = typeof Map;
declare type SetConstructor = typeof Set;
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
return?(value?: any): IteratorResult<T>;
throw?(e?: any): IteratorResult<T>;
}
8 changes: 7 additions & 1 deletion src/nativescript-angular/application.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
//Import globals before the zone, so the latter can patch the global functions
import 'globals';

//prevent a crash in zone patches
global.HTMLElement = function() {}
global.document = {};
import "zone.js/dist/zone.js"
global.HTMLElement = undefined;
global.document = undefined;

import 'reflect-metadata';
import './polyfills/array';
import {isPresent, Type} from 'angular2/src/facade/lang';
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {platform, ComponentRef, PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/core';
import {bind, provide, Provider} from 'angular2/src/core/di';
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
Expand Down
10 changes: 7 additions & 3 deletions src/nativescript-angular/directives/list-view.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import {HostListener, Host, Directive, Component, ContentChild, EmbeddedViewRef, TemplateRef, ViewContainerRef} from 'angular2/core';
import {View} from 'ui';
import {
HostListener, Host, Directive,
Component, ContentChild, EmbeddedViewRef,
TemplateRef, ViewContainerRef
} from 'angular2/core';
import {View} from 'ui/core/view';
import {NgView} from '../view-util'
const NG_VIEW = "_ngViewRef";

Expand Down Expand Up @@ -87,4 +91,4 @@ function getSingleViewFromViewRef(viewRef: EmbeddedViewRef): View {
}

return getSingleViewRecursive(viewRef.rootNodes, 0);
}
}
23 changes: 13 additions & 10 deletions src/nativescript-angular/router/page-router-outlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ import {isBlank, isPresent} from 'angular2/src/facade/lang';
import {StringMapWrapper} from 'angular2/src/facade/collection';

import {Directive, Attribute, DynamicComponentLoader, ComponentRef, ElementRef,
Injector, provide, Type, Component, OpaqueToken, Inject} from 'angular2/core';
Injector, provide, Type, Component, OpaqueToken, Inject} from 'angular2/core';

import * as routerHooks from 'angular2/src/router/lifecycle_annotations';
import { hasLifecycleHook} from 'angular2/src/router/route_lifecycle_reflector';

import { ComponentInstruction, RouteParams, RouteData, RouterOutlet, LocationStrategy, Router,
OnActivate, OnDeactivate, CanReuse, OnReuse } from 'angular2/router';

import { topmost } from "ui";
import { Page, NavigatedData } from "ui/page";
import { log } from "./common";
import { NSLocationStrategy } from "./ns-location-strategy";
import {hasLifecycleHook} from 'angular2/src/router/route_lifecycle_reflector';

import {
ComponentInstruction, RouteParams, RouteData,
RouterOutlet, LocationStrategy, Router,
OnActivate, OnDeactivate, CanReuse, OnReuse
} from 'angular2/router';

import {topmost} from "ui/frame";
import {Page, NavigatedData} from "ui/page";
import {log} from "./common";
import {NSLocationStrategy} from "./ns-location-strategy";


let COMPONENT = new OpaqueToken("COMPONENT");
Expand Down
9 changes: 0 additions & 9 deletions tests/app/global.d.ts

This file was deleted.

14 changes: 7 additions & 7 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"nativescript": {
"id": "org.nativescript.helloworldng",
"tns-android": {
"version": "1.6.0"
"version": "1.6.2"
}
},
"name": "nativescript-hello-world-ng",
Expand All @@ -27,16 +27,16 @@
},
"homepage": "http://nativescript.org",
"dependencies": {
"angular2": "2.0.0-beta.6",
"tns-core-modules": "^1.7.0-angular-0",
"angular2": "2.0.0-beta.7",
"nativescript-unit-test-runner": "^0.2.8",
"parse5": "1.4.2",
"punycode": "1.3.2",
"querystring": "0.2.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"tns-core-modules": "1.6.0",
"url": "0.10.3",
"zone.js": "0.5.14"
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"chai": "^3.5.0",
Expand All @@ -45,8 +45,8 @@
"karma-mocha": "^0.2.1",
"karma-nativescript-launcher": "^0.3.1",
"mocha": "^2.4.5",
"nativescript-dev-typescript": "^0.2.2",
"nativescript-dev-typescript": "^0.3.1",
"shelljs": "^0.5.3",
"typescript": "^1.7.5"
"typescript": "1.8.2"
}
}
Loading