So I was hoping to add animations to my web page. I at first tried difficult ones and that didn't work out (I'm very unfamiliar with angular animations). Now I tried a basic one, but even now it doesn't work.
I added a basic animation to the component. When the element enters the page I want the opacity to change from 0 to 1 over a time period of 2 seconds. When I have the animation property in my component decorator my template isn't showing in the browser (also no errors in the console). When I remove the animation it works like before and shows my component (without animation of course)
Can someone see where I'm wrong?
Component decorator
@Component({
selector: 'find-locals',
styleUrls: ['find-locals.component.css'],
templateUrl: 'find-locals.component.html',
animations: [
trigger('tijl', [
state('start', style({
opacity: 0
})),
transition(':enter', [
animate(2000)
])
])
]
})
Template
<div @tijl class="header-box header-box--left">
<h3 class="profileSection__data">Content</h3>
</div>