Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ember linkTo => link-to (c. Em.v1.0 9/26/2013)
In general:
1. somepropBinding=val => someprop=val
2. except for classNameBindings
e.g. classNameBindings=":option isSelected:selected"
for example:
{{#linkTo
option.path
typeBinding=option.value
classNames="option"
classNameBindings="selected"}}
<i {{bindAttr class=":icon option.icon"}}></i>{{option.name}} ({{option.count}})
{{/linkTo}}
{{#link-to
option.path
type=option.value
classNameBindings=":option isSelected:selected" //prop in view/component must be isSelected
}}
<i {{bindAttr class=":icon option.icon"}}></i>{{option.name}} ({{option.count}})
{{/link-to}}
@ashaegupta

This comment has been minimized.

Copy link

@ashaegupta ashaegupta commented Sep 30, 2013

very helpful! Thanks so much for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.