2017-02-22 18:13:21 +00:00
|
|
|
/* Second Heroes version */
|
|
|
|
// #docregion
|
|
|
|
import { Component } from '@angular/core';
|
2017-10-09 22:21:04 -05:00
|
|
|
// #docregion animation-imports
|
|
|
|
import { RouterOutlet } from '@angular/router';
|
|
|
|
import { slideInAnimation } from './animations';
|
2017-02-22 18:13:21 +00:00
|
|
|
|
|
|
|
@Component({
|
2017-08-22 21:31:15 +02:00
|
|
|
selector: 'app-root',
|
2017-10-23 08:11:51 -05:00
|
|
|
templateUrl: 'app.component.html',
|
|
|
|
styleUrls: ['app.component.css'],
|
2017-10-09 22:21:04 -05:00
|
|
|
animations: [ slideInAnimation ]
|
2017-02-22 18:13:21 +00:00
|
|
|
})
|
2017-10-23 08:11:51 -05:00
|
|
|
// #enddocregion animation-imports
|
2017-10-09 22:21:04 -05:00
|
|
|
// #docregion function-binding
|
|
|
|
export class AppComponent {
|
|
|
|
getAnimationData(outlet: RouterOutlet) {
|
|
|
|
return outlet && outlet.activatedRouteData && outlet.activatedRouteData['animation'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// #enddocregion function-binding
|