Skip to content

new clearHistory routing and RadSideDrawer #371

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
NathanWalker opened this issue Jul 27, 2016 · 4 comments
Closed

new clearHistory routing and RadSideDrawer #371

NathanWalker opened this issue Jul 27, 2016 · 4 comments

Comments

@NathanWalker
Copy link
Contributor

When using the new clearhistory routing which is awesome btw!!... the RadSideDrawer unfortunately will not open it's drawer over the top of the new route page... you can toggle it open/close all day long, but it will not show it's side drawer over top of the routed to page.

<ActionBar title="App">
  <ActionItem (tap)="drawerService.toggle()" *ngIf="(authService.state$ | async)?.loggedIn">
    <Button class="fa" [text]="'fa-bars' | fonticonPure"></Button>
  </ActionItem>
</ActionBar>
<RadSideDrawer #drawer [transition]="sideDrawerTransition" selectionBehavior="None" top="0" left="0" width="100%" height="100%">
  <template drawerSide>
    <GridLayout class="side-drawer" rows="auto, *, auto" columns="*">
      <StackLayout class="side-primary" row="0" col="0">
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.search}" [nsRouterLink]="['/']" clearHistory="true" pageTransition="slideLeft">
          <Label text="&#xf002;" class="fa" row="0" col="0"></Label>
          <Label text="Search" row="0" col="1"></Label>
        </GridLayout>
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.playlist}" [nsRouterLink]="['/playlist']" clearHistory="true" pageTransition="slideLeft">
          <Label [text]="'fa-list' | fonticon" class="fa" row="0" col="0"></Label>
          <Label text="Playlists" row="0" col="1"></Label>
        </GridLayout>
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.shoutout}" [nsRouterLink]="['/shoutout']" clearHistory="true" pageTransition="slideTop">
          <Label [text]="'fa-microphone' | fonticon" class="fa" row="0" col="0"></Label>
          <Label text="ShoutOuts" row="0" col="1"></Label>
        </GridLayout>
      </StackLayout>
      <StackLayout class="side-bottom" row="2" col="0">
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.general}" [nsRouterLink]="['/general']" clearHistory="true" pageTransition="slideBottom">
          <Label [text]="'fa-cog' | fonticon" class="fa" row="0" col="0"></Label>
          <Label text="Settings" row="0" col="1"></Label>
        </GridLayout>
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.help}" [nsRouterLink]="['/help']" clearHistory="true" pageTransition="slideBottom">
          <Label [text]="'fa-question-circle' | fonticon" class="fa" row="0" col="0"></Label>
          <Label text="Help" row="0" col="1"></Label>
        </GridLayout>
        <GridLayout columns="auto, *" rows="60" class="side-item" [ngClass]="{'item-active': activeRoute.about}" [nsRouterLink]="['/about']" clearHistory="true" pageTransition="slideBottom">
          <Label [text]="'fa-info-circle' | fonticon" class="fa" row="0" col="0"></Label>
          <Label text="About ShoutOutPlay" row="0" col="1"></Label>
        </GridLayout>
      </StackLayout>
    </GridLayout>
  </template>
  <template drawerMain>
    <page-router-outlet></page-router-outlet>
  </template>
</RadSideDrawer>

This behavior can be observed on this branch: https://github.com/NathanWalker/ShoutOutPlay/tree/router-clear-history

@NathanWalker NathanWalker changed the title new clearHistory and RadSideDrawer new clearHistory routing and RadSideDrawer Jul 27, 2016
@vakrilov
Copy link
Contributor

vakrilov commented Aug 1, 2016

The page-router-outlet loads another page that will has no side-drawer on it.
Any content outside the page-router-outlet will not be included in the new page you are navigating to.

@NathanWalker
Copy link
Contributor Author

Maybe the solution would be to use router-outlet instead? However I guess using that will have to wait until this is cleared: #343 or more specifically this issue: https://github.com/telerik/nativescript-ui-samples-angular/issues/13

Thanks for the input and I'm excited to see this fixed in ui repo! @VladimirAmiorkov my eyes are on you :) Thank you for your attention to this highly desired scenario.

@VladimirAmiorkov
Copy link
Contributor

Hi @NathanWalker ,

I have committed a fix for the router-outlet and if all is well it should be available in the next official release of nativescript-telerik-ui.

@NathanWalker
Copy link
Contributor Author

I got this working 👍 Thanks again @VladimirAmiorkov

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