Angular Passing string to component - with or without binding?

I know there are several ways to pass a string literal to a component:

<component inputField="string"></component>
<component [inputField]="'string'"></component>
<component inputField="{{'string'}}"></component>

      

Are they different? Is Angular checking for property changes in the second and third way and not checking in the first, or is Angular smart that it does not check for any changes to properties containing string literals?

+3


source to share





All Articles