I have quickly created a simple component
@Component({
selector: 'saved-overlay',
templateUrl: './saved-overlay.html',
exportAs: 'saved-overlay',
animations: [
trigger('inOut', [
transition('void => *', [
animate("300ms ease-out", keyframes([
style({opacity: 0}),
style({opacity: 1})
]))
]),
transition('* => void', [
animate("300ms ease-out", keyframes([
style({opacity: 1}),
style({opacity: 0})
]))
])
])
]
})
export class SavedOverlayComponent {
}
and I call it in my template this way :
<saved-overlay #myOverlay='saved-overlay'></saved-overlay>
Is there anyway to call the inOut animation from outside my component (i.e. in the template where I reference this component). What I would like ideally would be to use this animation on my component itself :
<saved-overlay #myOverlay='saved-overlay' [@inOut]></saved-overlay>
However, it does trigger an error saying that my inOut animation isn't defined.