You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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
}
}
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
in short, when created using `createCustomComponent`, the field `caption` returns, not the function, but the value. Furthermore it does not work at all in the html template.
Please provide the environment you discovered this bug in (run ng version)
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Here is how a component is inserted in
app.module
usingcreateCustomComponent
:And here is the component:
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: