Parámetro en Animación Angular2
Estoy tratando de hacer una animación simple como la simple jQuery a continuación
animate({'left' : left_indent})
Estoy usando las animaciones Angular2, pero el problema es ¿cómo paso el parámetro left_indent fuera de mi Clase de componente al activador de animación?
animations: [
trigger('flyInOut', [
state('for', style({
left: this.left_indent,
})),
transition('* => for', [
animate(2000, keyframes([
style({ opacity: 1, transform: 'translateX(0)', offset: 0 }),
style({ opacity: 1, transform: 'translateX(-300px)', offset: 0.5 }),
]))
]),
])
]