In my page i use this:
this.navCtrl.push(HomePage);
Automatically generated back button
but a back button will automatically be added to the pushed view, how to use default bar?
If you do not want the Back button to be shown as an option you could simply hide it on the page in which you are navigating to.
<ion-navbar hideBackButton="true"></ion-navbar>
More info on Ionic NavBar here.
If you don't want to have the back button then you can set it as a root page using "setRoot()" instead of push() like this,
this.navCtrl.setRoot(HomePage);
just try this it work great for me it will be automatically deactivate back button and show Menu toggle
this.childNavCtrl.setRoot(HomePage);
Related
I'm writing a PWA app. What I want is back and refresh button on title bar. But I got nothing.
The display property in the manifest file must be either "fullscreen" or "standalone". In both cases, the back and refresh buttons won't be shown.
Set the display property as "minimal-ui" or "browser", the back and refresh button will be shown.
Note: Clear cache/Uninstall the PWA for changes to take place
in my Ionic app - how can I add links to other states that would not add an entry into the navigation stack.
I need to add links to that would move user to another state/view. And in some cases (not always) I don't want the 'back' button to appear in the nav, allowing user to return to the previous page. Is this achievable?
Thanks in advance.
For this you can use $ionicHistory.
$ionicHistory.nextViewOptions({
disableBack: true
});
I'm using gwtp and I have some troubles with the browsers back button.
My DefaultPlace is a login page (root content). If the the login is correct, it directs you to a welcome page (MainPagePresenter) with a menu bar. This menu bar is always visible when going through its items. Clicking on an item reveals specific content (setInSlot) . When you use the back button it changes the token name to the token used before but you still see the old content.
My question is: How do I get back to the content which was shown before?
You shoud use the GWTP presenter lifecycle. When you use back button, the previous presenter is revealed. You should override onReveal() and onHide() to clean or save the presenter and view state.
If you want clean a presenter when the place changed, you should override onHide() and in the body you can clean the view before the place change.
Is it possible to show a popup only in a certain gwt tab or a panel in that tab?
I've found methods to show a popups over the whole page, but not only in specific tabs.
When you switch the gwt tab, the popup should not be visible anymore and new popups should be able to be created, which again are only visible in the switched to gwt tab. Switching back to the other tab should then show the first popup again.
Optionally the rest of the tab, which is not covered by the popup, should not be clickable.
Are there any native methods for this? The gwt Popup Panel only seems to create popups for the whole page.
Edit: I've tried using smartgwts Window which seems to work just the way I want it to. When I switch the gwt-tab, the popup is no longer visible and returns when I switch back. The only problem is, that it isn't displayed right. The frame is placed on the far left side of the browser tab, while the content is displayed on the far left of the gwt-tab. If I move the content, the frame moves too. The frame is visible over the whole browser tab, while the content disappears if I drag it over the gwt-tab edge.
I guess it's because I'm adding a Window to a gwt-Panel. Is there any way to fix this without changing everything to smartgwt?
Not exactly, I think.
But, you can do something in the tab events, like hide the popup in tabs that it doesnt belongs. To avoid the lag of show/hide the popup, you can do this in the BeforeSelectionHandler, like this:
getView().getTabPanel().addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>()
{
#Override
public void onBeforeSelection(BeforeSelectionEvent<Integer> event)
{
showPopupupsForTab(event.getItem());
}
});
In showPopupupsForTab you can show the popups for this tab (you can handle this with a map or something) and hide the others...
Something like this.
Hope it helps.
I am using Coda-Slider for my website and I want to know if there is a way to change the content of each tab. For example, the user navigates onto tab2 where I placed a link to redirect the user to another page. Is there a way NOT to navigate away from the page nor the tab but instead load the link inside the tab? I was thinking it would look something like a modal box that would stay inside the tab instead of popping up.
see 19. Coda-Slider Sliding Tabs or you might want to try 35. JQuery IDTabs if you want the effect to be non-intrusive