0
Follow
4
View

How do I make an @Input property readonly in an Angular component?

cuiliang521 注册会员
2023-01-26 07:40

You simply need to use the readonly qualifier as below, between the @Input decorator and the name identifier.

@Input() readonly name: string;