Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Allow usage of bound properties in {{link-to}}. #12456

Merged
merged 2 commits into from
Oct 8, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Oct 7, 2015

Due to values in this.attrs being either a MutableCell or the actual value, many flags in link-to would not function properly when provided a
bound property. This PR fixes that by using the standard public API for accessing a components provided attributes (this.get('attributeName')).

tldr; this.attrs should be avoided. It is quite a :trollface: in non-GlimmerComponent's.

Note: This builds on top of #12454, but due to this being a larger set of changes I preferred to make this a separate PR that is targetted to 2.2 beta.

Due to the nature of `positionalParams`, it is trivial to supply
`params` as a hash argument to `{{link-to}}` instead of ordered args
(this allows truly dynamic link's). However, if `{{link-to params=foo}}`
is used `params` will be a `MutableCell` and the current code throws an
error in that circumstance.

*tldr;* `this.attrs` should be avoided. It is quite a 🧌 in
non-`GlimmerComponent`'s.
Due to values in `this.attrs` being either a `MutableCell` or the actual
value, many flags in `link-to` would not function properly when provided
a bound property.
rwjblue added a commit that referenced this pull request Oct 8, 2015
[BUGFIX beta] Allow usage of bound properties in {{link-to}}.
@rwjblue rwjblue merged commit 1f85853 into emberjs:master Oct 8, 2015
@rwjblue rwjblue deleted the DIE-ATTRS-DIE branch October 8, 2015 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant