fuse-angular/src/app/main/content/content.component.ts
Sercan Yemen 59b7c4a70b page layouts fixed
+ resposive fixes on apps
+ fixed: router animation breaks the perfect-scrollbar
+ updated the perfect-scrollbar version
2017-08-21 15:02:03 +03:00

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()
{
}
}