Binding a plain string value to a component's @Input
property in Angular
can be done in either of the two ways:
<my-component inputProperty="my-property-value"></my-component>
or:
<my-component [inputProperty]="'my-property-value'"></my-component>
Is one of them generally preferred over the other? (Are there exceptions?)
Is there a general convention regarding this?
Is this addressed in any Angular style guide (couldn't find anything in the official style guide).
From the One-time string initialization in the Angular docs: