diff --git a/ng-sample/app/app.ts b/ng-sample/app/app.ts index d1017c8cd..a21af57ef 100644 --- a/ng-sample/app/app.ts +++ b/ng-sample/app/app.ts @@ -41,6 +41,7 @@ nativeScriptBootstrap(RendererTest).then((compRef) => { //nativeScriptBootstrap(ImageTest); //nativeScriptBootstrap(NavigationTest, [NS_ROUTER_PROVIDERS]); // nativeScriptBootstrap(ActionBarTest, [NS_ROUTER_PROVIDERS], { startPageActionBarHidden: false }); +// nativeScriptBootstrap(ActionBarTest, [NS_ROUTER_PROVIDERS]); // nativeScriptBootstrap(ModalTest); // nativeScriptBootstrap(PlatfromDirectivesTest); // nativeScriptBootstrap(RouterOutletTest, [NS_ROUTER_PROVIDERS]); diff --git a/ng-sample/app/examples/action-bar/action-bar-test.ts b/ng-sample/app/examples/action-bar/action-bar-test.ts index 7bd9763b6..3b8c66ed5 100644 --- a/ng-sample/app/examples/action-bar/action-bar-test.ts +++ b/ng-sample/app/examples/action-bar/action-bar-test.ts @@ -75,8 +75,6 @@ class SecondComponent { } } - - @Component({ selector: 'action-bar-test', directives: [NS_ROUTER_DIRECTIVES], diff --git a/ng-sample/package.json b/ng-sample/package.json index 6303d91d3..b96c6087f 100644 --- a/ng-sample/package.json +++ b/ng-sample/package.json @@ -26,7 +26,7 @@ "tns-core-modules": "^2.0.0-angular-4", "nativescript-intl": "^0.0.2", "angular2": "2.0.0-beta.14", - "es6-shim": "^0.35.0", + "es6-shim": "^0.35.0", "parse5": "1.4.2", "punycode": "1.3.2", "querystring": "0.2.0", @@ -49,6 +49,9 @@ "id": "org.nativescript.ngsample", "tns-android": { "version": "1.7.1" + }, + "tns-ios": { + "version": "1.7.0" } } } \ No newline at end of file diff --git a/src/nativescript-angular/directives/action-bar.ts b/src/nativescript-angular/directives/action-bar.ts index b861defdf..73bf35b6c 100644 --- a/src/nativescript-angular/directives/action-bar.ts +++ b/src/nativescript-angular/directives/action-bar.ts @@ -50,9 +50,6 @@ registerElement("NavigationButton", () => require("ui/action-bar").NavigationBut }) export class ActionBarComponent { constructor(public element: ElementRef, private page: Page) { - } - - ngOnInit() { if (isBlank(this.page.actionBarHidden)) { this.page.actionBarHidden = false; } @@ -94,13 +91,11 @@ export class ActionBarScope { }) export class ActionItemDirective { constructor(public element: ElementRef, @Optional() private ownerScope: ActionBarScope) { - } - - ngOnInit() { if (this.ownerScope) { this.ownerScope.onActionInit(this); } } + ngOnDestroy() { if (this.ownerScope) { this.ownerScope.onActionDestroy(this); @@ -113,13 +108,11 @@ export class ActionItemDirective { }) export class NavigationButtonDirective { constructor(public element: ElementRef, @Optional() private ownerScope: ActionBarScope) { - } - - ngOnInit() { if (this.ownerScope) { this.ownerScope.onNavButtonInit(this); } } + ngOnDestroy() { if (this.ownerScope) { this.ownerScope.onNavButtonDestroy(this);