这是indexloc提供的服务,不要输入任何密码
Skip to content

Don't change the current context if using #each ... as |...| #2067

@Milner39

Description

@Milner39

It does not make sense at all that a snippet like this:

{{someVal}}
{{#each profiles as |profile|}}
    {{profile.username}}
    {{someVal}}
{{/each}}

changes the current context, instead of just assigning the new context (the current element of profiles) to a new identifier (profile).

{{someVal}} should be accessible inside and outside the {{#each}} block, instead of forcing us to do this:

{{someVal}}
{{#each profiles as |profile|}}
    {{profile.username}}
    {{@root.someVal}}
{{/each}}

If profiles already exits in the current context, it should be overwritten.

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