Hello, I have built a component as follows
export class AcknowledgementComponent implements AfterViewInit {
private description: string;
@Input('period') period: string;
constructor() {
}
ngAfterViewInit() {
console.log(this.period)
}
I have to perform some logic with that variable before using it in the template. But in ngOnInit and ngAfterViewInit, the variable is undefined. Can someone advise which hook to use in order to get the variable?