-
-
Notifications
You must be signed in to change notification settings - Fork 240
Closed
Description
I have two views, and I use the slideLeft and slideRight transition to navigate back and forth between them.
In the actionbar, I have font-icons as buttons with ios.position left and ios.position right. When the route changes happens, the buttons 'snap' into place after the page loads as opposed to being in the correct spot to begin with .
My Code =======
// main page
<GridLayout class="Page">
<ActionBar #title="">
<ActionItem ios.position="left" (tap)="goSettings()">
<Button text="" class="material-icons"
style="font-size: 28; color: rgba(0,0,0,.2);
background-color: transparent;
width: 50px;
text-align: left;">
</Button>
</ActionItem>
<NavigationButton visibility="false;"></NavigationButton>
</ActionBar>
</GridLayout>
// settings page
<GridLayout class="Page">
<ActionBar title="Settings">
<ActionItem ios.position="right" (tap)="goBack()">
<Button #swipeicon text="" class="material-icons"
style="font-size: 28; color: rgba(0,0,0,.2);
background-color: transparent;
width: 50px;
text-align: right;">
</Button>
</ActionItem>
<NavigationButton visibility="false;"></NavigationButton>
</ActionBar>
<Label text="Settings Page"></Label>
</GridLayout>
// function to change views
public goSettings() {
this.routerExtensions.navigate(["/settings"], {
transition: {
name: "slideRight",
duration: 300,
curve: "easeInOut"
}
});
}
When navigating from the main page to the settings page, the settings font-icon inside the actionbar snaps into place from left to right.