This commit is contained in:
Zakary Timson 2018-11-16 11:30:00 -05:00
parent b50a9f56ed
commit 70be7d7a29
2 changed files with 3 additions and 3 deletions

View File

@ -24,8 +24,8 @@
<mat-divider></mat-divider>
</mat-nav-list>
</mat-drawer>
<mat-drawer-content class="bg-secondary text-white" [ngClass]="{'p-4': !hide}" (click)="open = (mobile && open) ? false : open" style="position: relative">
<main class="h-100" [@routerTransition]="getState(o)">
<mat-drawer-content class="bg-secondary text-white p-4" (click)="open = (mobile && open) ? false : open">
<main class="h-100" [@routerTransition]="transition(o)">
<router-outlet #o="outlet"></router-outlet>
</main>
</mat-drawer-content>

View File

@ -38,7 +38,7 @@ export class AppComponent {
return this.router.navigate(['/login']).then(() => this.noTransition = false);
}
getState(outlet) {
transition(outlet) {
if(!outlet.isActivated || !!outlet.activatedRouteData.noAnimation || this.noTransition) return '';
return outlet.activatedRoute;
}