I want to pass in the delay of a component's animation from the html eg:
html:
<circles[delay]="'10000ms'"></circles>
ts:
@Component({
selector: 'circles',
templateUrl: 'app/landing-page/subcomponents/circles.component.html',
styleUrls: ['app/landing-page/subcomponents/circles.component.css'],
animations: [
trigger('flyIn', [
state('in', style({ transform: 'translateY(0)', opacity: 1 })),
transition('void => *', [
style({ transform: 'translateY(-100%)', opacity: 0 }),
animate("1000ms" + this.delay)
])
])
]
})
export class CirclesComponent {
@Input() private delay: string;
However when I do that it gives this error:
(SystemJS) Cannot read property 'delay' of undefined(…)
How can I pass in the delay to the component in html without causing this error?