Should Angular2 @Inputs be public or can/should we have a stricter API by making them private?
问题 I am using Angular2 with Typescript Suppose I have the following in my app component's template: ... <coffee-cup [coffee]="" ... My coffee-cup component: @Component({ selector: 'coffee-cup', ... }) export class CoffeeCup { @Input() public coffee = 0; } I am currently unsure of what my Input should look like. It could look like this: @Input() public coffee = 0; Or @Input() private coffee = 0; I am currently leaning towards making the member variable coffee private. I want to define a clear