Skip to content

Fix crashing ActionBar in IOS #193

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 1 commit into from
Apr 22, 2016
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 ng-sample/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
2 changes: 0 additions & 2 deletions ng-sample/app/examples/action-bar/action-bar-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ class SecondComponent {
}
}



@Component({
selector: 'action-bar-test',
directives: [NS_ROUTER_DIRECTIVES],
Expand Down
5 changes: 4 additions & 1 deletion ng-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -49,6 +49,9 @@
"id": "org.nativescript.ngsample",
"tns-android": {
"version": "1.7.1"
},
"tns-ios": {
"version": "1.7.0"
}
}
}
11 changes: 2 additions & 9 deletions src/nativescript-angular/directives/action-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down