Skip to content

Keep actionBar hidden after router navigation #97

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

Closed
matt4446 opened this issue Mar 1, 2016 · 2 comments
Closed

Keep actionBar hidden after router navigation #97

matt4446 opened this issue Mar 1, 2016 · 2 comments
Assignees
Milestone

Comments

@matt4446
Copy link

matt4446 commented Mar 1, 2016

using the property actionBarHidden has no effect after the first router navigation.

public ngOnInit()
{
     topmost().currentPage.actionBarHidden = true;
}

I'm not sure if this is intended or due to the planned changes for the action bar template?

@hdeshev hdeshev modified the milestone: Mid-March Mar 2, 2016
@vakrilov vakrilov self-assigned this Mar 11, 2016
@vakrilov
Copy link
Contributor

Hi @matt4446
The problem probably is that topmost().currentPage actually is the previous page as the navigation is not yet completed at the moment ngOnInit() is called.

Good news: with #104 we you can get your parent Page trough DI. So you can do the following in the component you are navigating to:

import {Page} from "ui/page";

@Component({
// ...
})
class MyComponent {
  constructor(page: Page) {
    page.actionBarHidden = true;
  }
}

@matt4446
Copy link
Author

Thanks @vakrilov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants