Skip to content

Let block for "the rest of the template" #520

@mehulkar

Description

@mehulkar

I don't know if this is technically feasible, but it would be nice to put values into scope for the entire template. Something like let block, without having to close the tag. The use case is to instantiate N components.

currently

{{#let (component "foo-bar") as |FooBar|}}
  {{#let (component "baz") as |Baz|}}
    <FooBar />
    <Bar />
  {{/let}}
{{/let}}

after

{{let (component "foo-bar") as |FooBar|}}
{{let (component "baz") as |Baz|}}

<FooBar />
<Bar />

If I understand correctly, each component template has its own scope, so it should be possible to have a syntax that allows you to put something in scope for the whole template. Some of this may also interplay with #454 (template import primitives) as that syntax does something similar.

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