Skip to content

Introduce array and object literal syntax in templates #621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

locks
Copy link
Contributor

@locks locks commented May 1, 2020

No description provided.

@locks locks force-pushed the array-hash-template-literal branch from 2852186 to e01376f Compare May 1, 2020 23:44
@locks locks changed the title Introduce syntax for array and object literals in templates Introduce template syntax for array and object literal May 5, 2020
@locks locks changed the title Introduce template syntax for array and object literal Introduce array and object literal syntax in templates May 5, 2020
@Gaurav0
Copy link

Gaurav0 commented May 7, 2020

Love this idea. We can mention that one possible implementation is to precompile to the array and hash helpers during that stage to eliminate any possible slowdown at runtime from adding to parsing.

@lifeart
Copy link

lifeart commented May 8, 2020

may be related https://github.com/lifeart/ember-eval-helper#ember-eval-helper
especially, for cases like:

{{#let (e "{ projectName: 'Ember' }") as |project|}}
  <h2 id="title">{{project.projectName}}</h2>
{{/let}}


{{#each (e "[1,2,3,4]") as |item|}}
    Number: {{item}}
{{/each}}

@wagenet
Copy link
Member

wagenet commented Jul 23, 2022

@locks where does this stand?

@wagenet wagenet added the S-Proposed In the Proposed Stage label Dec 2, 2022
@kategengler
Copy link
Member

Array and Object literal syntax was implemented in Handlebars but Glimmer does not (yet) use it

@NullVoxPopuli
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Proposed In the Proposed Stage T-templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants