1
|
import {Component, Input} from '@angular/core';
|
2
|
import {animation} from "./animation";
|
3
|
import {transition, trigger} from "@angular/animations";
|
4
|
|
5
|
@Component({
|
6
|
selector: 'slide',
|
7
|
template: `
|
8
|
<div @blockInitialRenderAnimation>
|
9
|
<div [@state]="{value: state, params: {y: y}}"
|
10
|
style="position: absolute;top: 50%;left: 50%;width: 100%;min-height: 50vh">
|
11
|
<ng-content></ng-content>
|
12
|
</div>
|
13
|
</div>
|
14
|
`,
|
15
|
animations: [animation,
|
16
|
trigger(
|
17
|
"blockInitialRenderAnimation",
|
18
|
[
|
19
|
transition( ":enter", [] )
|
20
|
]
|
21
|
)]
|
22
|
})
|
23
|
export class SlideComponent {
|
24
|
state: number = 1
|
25
|
y: number = -50;
|
26
|
medium: boolean = true;
|
27
|
}
|