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
Post a Comment