Skip to content

Commit b78b3ce

Browse files
authored
Merge branch 'master' into djenkov/modal-navigation
2 parents b5030d8 + 62919b1 commit b78b3ce

File tree

6 files changed

+44
-61
lines changed

6 files changed

+44
-61
lines changed

Diff for: .travis.yml

+2-50
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
env:
22
global:
3-
- NODE_VERSION=6
43
- NODE_VERSION=8
5-
- EMULATOR_API_LEVEL=22
4+
- EMULATOR_API_LEVEL=23
65
- ANDROID_VERSION=25
7-
- ANDROID_BUILD_TOOLS_VERSION=26.0.2
6+
- ANDROID_BUILD_TOOLS_VERSION=27.0.3
87
- ANDROID_ABI=armeabi-v7a
98
- APPIUM_VERSION=1.7.0
109
- EMULATOR_NAME=test
@@ -23,24 +22,6 @@ matrix:
2322
- npm run tslint
2423
- stage: "Build"
2524
os: osx
26-
env:
27-
- Build="iOS"
28-
osx_image: xcode9.3
29-
language: node_js
30-
node_js: "6"
31-
jdk: oraclejdk8
32-
before_install:
33-
- cd nativescript-angular
34-
- npm install
35-
- cd ../tests
36-
- npm install
37-
- cd ..
38-
script:
39-
- cd nativescript-angular
40-
- npm run ngc
41-
- cd ../tests
42-
- tns build ios
43-
- os: osx
4425
env:
4526
- Build="iOS"
4627
osx_image: xcode9.3
@@ -58,28 +39,6 @@ matrix:
5839
- npm run ngc
5940
- cd ../tests
6041
- tns build ios
61-
- language: android
62-
node_js: "6"
63-
os: linux
64-
env:
65-
- Build="Android"
66-
jdk: oraclejdk8
67-
before_install:
68-
- echo no | android create avd --force -n $EMULATOR_NAME -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG -c 12M
69-
- QEMU_AUDIO_DRV=none emulator -avd $EMULATOR_NAME -no-window &
70-
- nvm install $NODE_VERSION
71-
- cd nativescript-angular
72-
- npm install
73-
- cd ../tests
74-
- npm install
75-
- cd ..
76-
- android-wait-for-emulator
77-
- adb shell input keyevent 82 &
78-
script:
79-
- cd nativescript-angular
80-
- npm run ngc
81-
- cd ../tests
82-
- tns build android
8342
- language: android
8443
node_js: "8"
8544
os: linux
@@ -107,20 +66,13 @@ android:
10766
components:
10867
- tools
10968
- platform-tools
110-
- build-tools-25.0.2
11169
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
112-
- android-25
11370
- android-$EMULATOR_API_LEVEL
11471
- extra-google-google_play_services
11572
- extra-google-m2repository
11673
- extra-android-m2repository
117-
- addon-google_apis-google-25
11874
# Specify at least one system image,
11975
# if you need to run emulator(s) during your tests
120-
- sys-img-armeabi-v7a-android-26
121-
- sys-img-armeabi-v7a-android-25
122-
- sys-img-armeabi-v7a-android-17
123-
- sys-img-armeabi-v7a-android-19
12476
- sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL
12577
licenses:
12678
- ".+"

Diff for: CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<a name="6.0.0"></a>
2+
# [6.0.0](https://github.com/NativeScript/nativescript-angular/compare/5.3.0...6.0.0) (2018-05-30)
3+
4+
5+
### Bug Fixes
6+
7+
* Use cssType (uglify safe) instead typeName of for view metadata. ([d85910c](https://github.com/NativeScript/nativescript-angular/commit/d85910c))
8+
* **modal:** closeCallback(...) should not have side effects when called multiple times ([#1349](https://github.com/NativeScript/nativescript-angular/issues/1349)) ([bffbbc2](https://github.com/NativeScript/nativescript-angular/commit/bffbbc2))
9+
* **modal:** missing animated & stretched params ([#1293](https://github.com/NativeScript/nativescript-angular/issues/1293)) ([a9a901b](https://github.com/NativeScript/nativescript-angular/commit/a9a901b))
10+
* **router:** state is not guarded before use ([#1331](https://github.com/NativeScript/nativescript-angular/issues/1331)) ([d27a893](https://github.com/NativeScript/nativescript-angular/commit/d27a893)), closes [/github.com/NativeScript/nativescript-angular/commit/b98da83adb3f5c51ee448fa38a51b7c65274c82e#diff-a7820fa2a2eb0ce14f3f0b8bfc666dd5R49](https://github.com//github.com/NativeScript/nativescript-angular/commit/b98da83adb3f5c51ee448fa38a51b7c65274c82e/issues/diff-a7820fa2a2eb0ce14f3f0b8bfc666dd5R49)
11+
* **TabViewItemDirective :** textTransform property added ([#1315](https://github.com/NativeScript/nativescript-angular/issues/1315)) ([11d01f9](https://github.com/NativeScript/nativescript-angular/commit/11d01f9))
12+
13+
14+
### Features
15+
16+
* Angular 6 support
17+
* **router:** enable flexible page router outlets ([#1298](https://github.com/NativeScript/nativescript-angular/issues/1298)) ([b98da83](https://github.com/NativeScript/nativescript-angular/commit/b98da83))
18+
* **testing:** Testing Components with TestBed ([#1175](https://github.com/NativeScript/nativescript-angular/issues/1175)) ([52f3ec6](https://github.com/NativeScript/nativescript-angular/commit/52f3ec6))
19+
20+
121
<a name="5.3.0"></a>
222
# [5.3.0](https://github.com/NativeScript/nativescript-angular/compare/5.2.0...v5.3.0) (2018-04-10)
323

Diff for: nativescript-angular/common/utils.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@ export function throwIfAlreadyLoaded(
22
parentModule: any,
33
moduleName: string,
44
) {
5-
if ( parentModule ) {
5+
if (parentModule) {
66
throw new Error(`${moduleName} has already been loaded. Import ${moduleName} in the AppModule only.`);
77
}
88
}
9+
10+
export function once(fn: Function) {
11+
let wasCalled = false;
12+
13+
return function wrapper() {
14+
if (wasCalled) {
15+
return;
16+
}
17+
18+
wasCalled = true;
19+
fn.apply(null, arguments);
20+
};
21+
}

Diff for: nativescript-angular/directives/dialogs.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container/pro
1616
import { AppHostView } from "../app-host-view";
1717
import { DetachedLoader } from "../common/detached-loader";
1818
import { PageFactory, PAGE_FACTORY } from "../platform-providers";
19+
import { once } from "../common/utils";
1920

2021
export interface ModalDialogOptions {
2122
context?: any;
@@ -106,19 +107,17 @@ export class ModalDialogService {
106107
let componentView: View;
107108
let detachedLoaderRef: ComponentRef<DetachedLoader>;
108109

109-
const closeCallback = (...args) => {
110+
const closeCallback = once((...args) => {
110111
doneCallback.apply(undefined, args);
111-
if (componentView && !this.location._isModalClosing) {
112+
if (componentView) {
112113
this.location._beginCloseModalNavigation();
113-
114114
componentView.closeModal();
115-
} else if (this.location._isModalClosing) {
116115
this.location.back();
117116
this.location._finishCloseModalNavigation();
118117
detachedLoaderRef.instance.detectChanges();
119118
detachedLoaderRef.destroy();
120119
}
121-
};
120+
});
122121

123122
const modalParams = new ModalDialogParams(context, closeCallback);
124123
const providers = ReflectiveInjector.resolve([
@@ -141,7 +140,7 @@ export class ModalDialogService {
141140
}
142141

143142
// TODO: remove <any> cast after https://github.com/NativeScript/NativeScript/pull/5734
144-
// is in a published version of tns-core-modules.
143+
// is in a published version of tns-core-modules.
145144
(<any>parentView).showModal(componentView, context, closeCallback, fullscreen, animated, stretched);
146145
});
147146
}

Diff for: nativescript-angular/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"private": true,
32
"name": "nativescript-angular",
4-
"version": "5.3.0",
3+
"version": "6.0.0",
54
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
65
"homepage": "https://www.nativescript.org/",
76
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",

Diff for: tests/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"nativescript": {
33
"id": "org.nativescript.ngtests",
44
"tns-ios": {
5-
"version": "4.0.2-2018-04-13-01"
5+
"version": "next"
66
},
77
"tns-android": {
8-
"version": "4.1.0-2018.4.16.8"
8+
"version": "next"
99
}
1010
},
1111
"name": "ngtests",

0 commit comments

Comments
 (0)