I’m studying the Angular Material Button code and I noticed that within the @Component there a declared inputs property.
What is this for? The description says:
inputs – list of class property names to data-bind as component inputs
So I assume it’s complementary to the @Input() property declarations … But I’ve never seen it used anywhere else, so just curious why they are declaring it?
>Solution :
it is indeed the same thing as marking your input as @Input(), all of the components metadata (such as HostBinding, Output, ….) can be described in the @Component decorator, but the decorator way is usually the preferred one.