Skip to content

Reborn

Compare
Choose a tag to compare
@Serabe Serabe released this 10 Aug 16:59
· 22 commits to master since this release

This release changes the API completely and improves it thanks to the work of @mmun and @rwjblue.

Previous API accepted two positional parameters: the method and the context.

Current API is much more concise in the general case, while still allowing for selecting a totally custom target.

Now, {{bind model.submodel.method}} will automatically detect model.submodel as the target. In case you want a custom target, just pass it as a named parameter: {{bind model.submodel.method target=otherModel}}.

Beware that if the passed function path is similar to model.actions.method, the target will be just model and not model.actions.

Another improvement is that it now accepts extra positional parameters that will be passed to Ember.run.bind.

Finally, I would like to thank @mmun and @rwjblue.