mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-18 14:22:35 +00:00
+ resposive fixes on apps + fixed: router animation breaks the perfect-scrollbar + updated the perfect-scrollbar version
33 lines
901 B
TypeScript
33 lines
901 B
TypeScript
import { Component, HostBinding, OnInit } from '@angular/core';
|
|
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
|
import { Animations } from '../../core/animations';
|
|
|
|
@Component({
|
|
selector : 'fuse-content',
|
|
templateUrl: './content.component.html',
|
|
styleUrls : ['./content.component.scss'],
|
|
animations : [Animations.routerTransition]
|
|
})
|
|
export class FuseContentComponent implements OnInit
|
|
{
|
|
@HostBinding('@routerTransition') routeAnimationState = false;
|
|
|
|
constructor(
|
|
private router: Router,
|
|
private activatedRoute: ActivatedRoute
|
|
)
|
|
{
|
|
this.router.events
|
|
.filter((event) => event instanceof NavigationEnd)
|
|
.map(() => this.activatedRoute)
|
|
.subscribe((event) => {
|
|
this.routeAnimationState = !this.routeAnimationState;
|
|
});
|
|
}
|
|
|
|
ngOnInit()
|
|
{
|
|
|
|
}
|
|
}
|