This repository was archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 877
Additional information needed to avoid confusion about interpolation vs Property Binding #3041
Comments
I’m not sure I follow? That is where I posted my comment?
Maxxx
… On 29 Dec. 2016, at 19:02, William KOZA ***@***.***> wrote:
You must post your comment to the https://github.com/angular/angular.io <https://github.com/angular/angular.io> Repository.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#3041 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ACTL4ctxWk9QtkG3ciPjo8Lok-9TiW-sks5rM3c5gaJpZM4LWriD>.
|
Sorry, it was a mistake , I thought I was in GH angular ;) |
wardbell
added a commit
to IdeaBlade/angular.io
that referenced
this issue
Jan 2, 2017
I agree that "when rendering the data value as a string" is more precise. See PR #3041 |
wardbell
added a commit
that referenced
this issue
Jan 3, 2017
abdel-ships-it
pushed a commit
to abdel-ships-it/angular.io
that referenced
this issue
Feb 11, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the page at
https://angular.io/docs/ts/latest/guide/template-syntax.html#!#interpolation
when discussing
it states
While this is so in the specific examples, if the binding source is not a string (e.g. I want to pass a Hero object to the component rather than the name of the hero) then I cannot use interpolation as this 'stringifies' the object.
I would suggest the wording be modified to
There is no technical reason to prefer one form to the other when binding strings, as in the examples above. We lean toward readability, which tends to favor interpolation. We suggest establishing coding style rules and choosing the form that both conforms to the rules and feels most natural for the task at hand.
It is also possible to pass an object to a child control using property binding - but not using interpolation. In the examples below, currentHero is a Hero object, heroImageUrl is a string.
The text was updated successfully, but these errors were encountered: