Updating an Angular app with the new input
signal; changes so far have behaved as documented; declared:
imageID = input<number>()
however in one component, the signal variable is returning the value, not the function, e.g.:
@Component({
selector: 'app-pic-captioned',
templateUrl: './img-captioned.component.html',
styleUrls: ['./img-captioned.component.scss'],
})
export class ImgCaptionedComponent implements OnInit {
caption = input<string>();
constructor() {}
ngOnInit() {
console.log('this.caption:', this.caption); // this.caption Mississauga
console.log('this.caption()', this.caption()); // ERROR TypeError: this.caption is not a function
}
}
what is going on?