diff --git a/.travis.yml b/.travis.yml
index fc289f2cc..8fe66b1b1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
env:
global:
- - NODE_VERSION=6.9.1
+ - NODE_VERSION=6.11.1
- EMULATOR_API_LEVEL=19
- ANDROID_VERSION=23
- ANDROID_BUILD_TOOLS_VERSION=23.0.1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ce916fb8..8d8b3c3bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+
+## [3.1.2](https://github.com/NativeScript/nativescript-angular/compare/3.1.1...3.1.2) (2017-07-12)
+
+
+### Bug Fixes
+
+* **renderer:** attach `CommentNode`s to visual tree ([#888](https://github.com/NativeScript/nativescript-angular/issues/888)) ([65359fa](https://github.com/NativeScript/nativescript-angular/commit/65359fa)), closes [#872](https://github.com/NativeScript/nativescript-angular/issues/872)
+
+
+
## [3.1.1](https://github.com/NativeScript/nativescript-angular/compare/3.1.0...3.1.1) (2017-06-29)
diff --git a/nativescript-angular/CHANGELOG.md b/nativescript-angular/CHANGELOG.md
new file mode 100644
index 000000000..b7936aee2
--- /dev/null
+++ b/nativescript-angular/CHANGELOG.md
@@ -0,0 +1,27 @@
+
+## [3.1.3](https://github.com/NativeScript/nativescript-angular/compare/3.0.0...3.1.3) (2017-07-19)
+
+
+### Bug Fixes
+
+* **action-bar:** ignore InvisibleNodes when adding title ([#903](https://github.com/NativeScript/nativescript-angular/issues/903)) ([8308e45](https://github.com/NativeScript/nativescript-angular/commit/8308e45)), closes [#897](https://github.com/NativeScript/nativescript-angular/issues/897)
+* **animations:** use parsers from core modules ([#844](https://github.com/NativeScript/nativescript-angular/issues/844)) ([1abebb6](https://github.com/NativeScript/nativescript-angular/commit/1abebb6)), closes [#738](https://github.com/NativeScript/nativescript-angular/issues/738)
+* **dom-adapter:** add fake implementation for getUserAgent ([#835](https://github.com/NativeScript/nativescript-angular/issues/835)) ([743131c](https://github.com/NativeScript/nativescript-angular/commit/743131c)), closes [#831](https://github.com/NativeScript/nativescript-angular/issues/831)
+* **forms:** add (touch) event and [disabled] property for controls ([#836](https://github.com/NativeScript/nativescript-angular/issues/836)) ([c8a6404](https://github.com/NativeScript/nativescript-angular/commit/c8a6404)), closes [#804](https://github.com/NativeScript/nativescript-angular/issues/804)
+* asynchronously destroy items evicted on clearHistory navigation ([#847](https://github.com/NativeScript/nativescript-angular/issues/847)) ([448412a](https://github.com/NativeScript/nativescript-angular/commit/448412a)), closes [#829](https://github.com/NativeScript/nativescript-angular/issues/829)
+* export NgView and NgElement from element-registry ([#823](https://github.com/NativeScript/nativescript-angular/issues/823)) ([4521c7c](https://github.com/NativeScript/nativescript-angular/commit/4521c7c))
+* **forms:** add directives for formControl ([#861](https://github.com/NativeScript/nativescript-angular/issues/861)) ([bd38745](https://github.com/NativeScript/nativescript-angular/commit/bd38745))
+* **ns-router-link:** convert clearHistory string to boolean ([#834](https://github.com/NativeScript/nativescript-angular/issues/834)) ([ff99984](https://github.com/NativeScript/nativescript-angular/commit/ff99984)), closes [#832](https://github.com/NativeScript/nativescript-angular/issues/832)
+* **renderer:** add styles when ViewEncapsulation is None ([#812](https://github.com/NativeScript/nativescript-angular/issues/812)) ([8d013e2](https://github.com/NativeScript/nativescript-angular/commit/8d013e2)), closes [#794](https://github.com/NativeScript/nativescript-angular/issues/794)
+* **renderer:** attach `CommentNode`s to visual tree ([#888](https://github.com/NativeScript/nativescript-angular/issues/888)) ([65359fa](https://github.com/NativeScript/nativescript-angular/commit/65359fa)), closes [#872](https://github.com/NativeScript/nativescript-angular/issues/872)
+* **renderer:** set templateParent to comment and text nodes ([#785](https://github.com/NativeScript/nativescript-angular/issues/785)) ([b127ba7](https://github.com/NativeScript/nativescript-angular/commit/b127ba7)), closes [#777](https://github.com/NativeScript/nativescript-angular/issues/777) [#787](https://github.com/NativeScript/nativescript-angular/issues/787)
+* **renderer:** stop performing value conversions ([#806](https://github.com/NativeScript/nativescript-angular/issues/806)) ([354074d](https://github.com/NativeScript/nativescript-angular/commit/354074d)), closes [#799](https://github.com/NativeScript/nativescript-angular/issues/799)
+* **time-value-accessor:** typo onTouch -> onTouched ([#843](https://github.com/NativeScript/nativescript-angular/issues/843)) ([6168ddb](https://github.com/NativeScript/nativescript-angular/commit/6168ddb))
+
+
+### Features
+
+* **Modal:** allow modal to be lazily loaded from a module on demand ([#772](https://github.com/NativeScript/nativescript-angular/issues/772)) ([6a1f6a9](https://github.com/NativeScript/nativescript-angular/commit/6a1f6a9))
+
+
+
diff --git a/nativescript-angular/directives/action-bar.ts b/nativescript-angular/directives/action-bar.ts
index a48795345..5158a1532 100644
--- a/nativescript-angular/directives/action-bar.ts
+++ b/nativescript-angular/directives/action-bar.ts
@@ -5,6 +5,7 @@ import { View } from "tns-core-modules/ui/core/view";
import { isBlank } from "../lang-facade";
import {
+ InvisibleNode,
NgView,
ViewClassMeta,
registerElement,
@@ -16,7 +17,9 @@ const actionBarMeta: ViewClassMeta = {
const bar = (parent);
const childView = child;
- if (child instanceof NavigationButton) {
+ if (child instanceof InvisibleNode) {
+ return;
+ } else if (child instanceof NavigationButton) {
bar.navigationButton = childView;
childView.parent = bar;
} else if (child instanceof ActionItem) {
@@ -30,7 +33,9 @@ const actionBarMeta: ViewClassMeta = {
const bar = (parent);
const childView = child;
- if (child instanceof NavigationButton) {
+ if (child instanceof InvisibleNode) {
+ return;
+ } else if (child instanceof NavigationButton) {
if (bar.navigationButton === childView) {
bar.navigationButton = null;
}
diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json
index 0ec2d8c69..05ad285e2 100644
--- a/nativescript-angular/package.json
+++ b/nativescript-angular/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "nativescript-angular",
- "version": "3.1.2",
+ "version": "3.1.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",
diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts
index 174976830..5c019a1e0 100644
--- a/nativescript-angular/router/page-router-outlet.ts
+++ b/nativescript-angular/router/page-router-outlet.ts
@@ -64,6 +64,7 @@ export class PageRouterOutlet { // tslint:disable-line:directive-class-suffix
private refCache: RefCache = new RefCache();
private isInitialPage: boolean = true;
private detachedLoaderFactory: ComponentFactory;
+ private itemsToDestroy: CacheItem[] = [];
private currentActivatedComp: ComponentRef;
private currentActivatedRoute: ActivatedRoute;
@@ -132,7 +133,12 @@ export class PageRouterOutlet { // tslint:disable-line:directive-class-suffix
private clearRefCache() {
while (this.refCache.length > 0) {
- this.destroyCacheItem(this.refCache.pop());
+ this.itemsToDestroy.push(this.refCache.pop());
+ }
+ }
+ private destroyQueuedCacheItems() {
+ while (this.itemsToDestroy.length > 0) {
+ this.destroyCacheItem(this.itemsToDestroy.pop());
}
}
private destroyCacheItem(poppedItem: CacheItem) {
@@ -242,7 +248,10 @@ export class PageRouterOutlet { // tslint:disable-line:directive-class-suffix
// Add it to the new page
page.content = componentView;
- page.on("navigatedFrom", (global).Zone.current.wrap((args: NavigatedData) => {
+ page.on(Page.navigatedToEvent, () => setTimeout(() => {
+ this.destroyQueuedCacheItems();
+ }));
+ page.on(Page.navigatedFromEvent, (global).Zone.current.wrap((args: NavigatedData) => {
if (args.isBackNavigation) {
this.locationStrategy._beginBackPageNavigation();
this.locationStrategy.back();