Closed sunny-mittal closed 9 years ago
each model as |item|
Works in our templates.. On Thu, Aug 13, 2015 at 12:56 AM Sunny Mittal notifications@github.com wrote:
Hello, I was wondering if it's possible to construct an each block that compiles to the block form desired by the current Ember version. I only discovered Emblem about an hour ago when looking for a way to use Jade with Ember, so forgive me for my ignorance. I scoured the docs and the existing GH issues and couldn't find anything. When I use the following construct:
each user in model li = user
it compiles and works, but Ember warns me that the compiled form:
{{#each item in model}} is
is deprecated and that the desired form is:
{{#each model as |item|}}
Any help would be greatly appreciated! I know that right now I can go ahead and use the each...in syntax, but if Ember removes support for the deprecated version, I'll be in trouble. Thanks in advance!
— Reply to this email directly or view it on GitHub https://github.com/machty/emblem.js/issues/251.
Oh hmm, this is kind of strange. I generated the project with the current ember-cli and assumed it'd have all the dependencies up-to-date. It turns out ember-cli-release was not the most current, and updating that fixed the problem (though I don't really know why ember would have anything to do with it). Anyway, it seems to be working fine so I will close this and thank you!
I am trying to use each model as |item|
but in browser it gets changed into "each model as |item|"
@umairabid remove backticks `` around expression. I just figured this out by accident :)
Hello, I was wondering if it's possible to construct an
each
block that compiles to the block form desired by the current Ember version. I only discovered Emblem about an hour ago when looking for a way to use Jade with Ember, so forgive me for my ignorance. I scoured the docs and the existing GH issues and couldn't find anything. When I use the following construct:it compiles and works, but Ember warns me that the compiled form:
is deprecated and that the desired form is:
Any help would be greatly appreciated! I know that right now I can go ahead and use the each...in syntax, but if Ember removes support for the deprecated version, I'll be in trouble. Thanks in advance!