Skip to content

Difference for syntax of {{#with}} and {{#each}} between API and blog #10994

Description

@YoranBrondsema

For the {{#with}} helper the API documentation says to use it as follows (see http://emberjs.com/api/classes/Ember.Handlebars.helpers.html#method_with):

{{#with user.posts as blogPosts}}
  ...
{{/with}}

However, the blog post about the release of Ember 1.10 says to use the following syntax (see http://emberjs.com/blog/2015/02/07/ember-1-10-0-released.html#toc_block-params):

{{#with user.posts as |blogPosts|}}
  ...
{{/with}}

I can imagine both are semantically equivalent (is that so?). However, what is the policy on documenting new syntax in the API documentation? I can understand if this would only happen if one of the syntaxes becomes deprecated, in order to avoid confusion. Is that the case? Otherwise, I'd be happy to update the documentation to reflect the new syntax.

The same is the case for {{#each}} helper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions