javascript - Difference between binding using [] syntax and without -


i have custom my-table property row bound host component. can put html in 2 ways:

<my-table [rows]="displayentriescount"></my-table> 

and this:

<my-table rows="{{displayentriescount}}"></my-table> 

what's difference?

<my-table [rows]="displayentriescount"></my-table> 

binds value in displayentriescount is

<my-table rows="{{displayentriescount}}"></my-table> 

does string interpolation. means assigned value stringified value of displayentriescount. don't use if want assign object values.


Comments

Popular posts from this blog

Formatting string according to pattern without regex in php -

c - zlib and gdi32 with OpenSSL? -

java - inputmismatch exception -