Вообщем проблема, у меня есть Angular 2 анимация
trigger('focusPanel', [
state('inactive', style({
transform: 'scale(1)'
})),
state('active', style({
transform: 'translateX(535px)'
})),
transition('inactive=>active', animate('600ms', keyframes([
style({
transform: 'translate3d(0px, 0, 0)'
}),style({
opacity: 1,
transform: 'translate3d(325px, 0, 0)'
}),style({
transform: 'translate3d(420px, 0, 0)'
}),style({
transform: 'translate3d(550px, 0, 0)'
}),style({
transform: 'translate3d(525px, 0, 0)'
}),style({
transform: 'translate3d(540px, 0, 0)'
}),style({
transform: 'translate3d(525px, 0, 0)'
}),style({
transform: 'translate3d(535px, 0, 0)'
}),
функция
toggleMove(){
this.state = (this.state === 'inactive' ? 'active': 'inactive');
}
при клике на submit input уезжает, но проблема в том что когда он пустой анимация все равно срабатывает. Вопрос как сделать чтобы только при заполненом input срабатывала анимация.