Can anyone assist me with ng2 animate? I am looking to create a simple hover effect based on the code snippet below:
@Component({
selector: 'category',
template : require('./category.component.html'),
styleUrls: ['./category.component.scss'],
animations: [
trigger('albumState', [
state('inactive', style({
bottom: '0px'
})),
state('active', style({
bottom: '200px'
})),
transition('inactive => active', animate('100ms ease-in')),
transition('active => inactive', animate('100ms ease-in'))
])
]
})
I would appreciate some guidance on how to apply this animation to the template. The Ng2 Docs show an implementation using object parameters, but I want to assign the animation to the template without modifying any parameters of my item/object/album from the category.
Thank you in advance for your help! Greg