Howdy friends! Ember.js 1.10 will branch into beta in about a week.
The HTMLBars templating engine is in master now, behind a feature flag. In order to catch more issues before beta (and to give us a better understanding of if the feature can move forward), I’d like to ask a favor.
Follow @rwjblue’s guide on testing HTMLBars in your Ember app, and open an issue if anything seems awry. Seeing how well the code works in real-world apps is super important! There is no new syntax behind the feature flag, but existing code should Just Work.
And while you’re on master, check out two other new features:
Block params (ember-htmlbars-block-params). Ember components can now yield values to an their block context. This provides an important escape valve for strict component encapsulation. Read about it in the rfc, and thepullrequests.
Inline if for HTMLBars templates (ember-htmlbars-inline-if-helper). Like so: {{if isAuthenticated 'Hello user!'}} This is of limited utility now, but once we get the new HTMLBars attribute syntax merged you will see used with class and other attributes.
Thanks for your review! I hope you are as excited to try this as those of us working on it are to see it ship
I’m feeling super positive about Ember lately, really exciting to see all this stuff that’s been talked about for so long start making it into beta – can’t wait to try this out.
We are using ember-template-compiler as part of our build chain so I can’t follow along with the instructions @rwjblue 's guide. We pretty much live on canary so can give me some direction on how to get htmlbars enabled?
Started testing https://github.com/broerse/ember-cli-blog/tree/htmlbars. It is not working yet. There is some strange Ember-Pouch error but perhaps that is more canary related. Should it work without fixing DEPRECATION: Usage of Ember.Handlebars.helper is deprecated. Please use Ember.HTMLBars.helper. ??
I’ve got a super simple Ember app that I wanted to try with the latest and greatest. I followed the directions in the article and when I try and run I get an error:
Awesome, thanks for working through it! Once we go to beta, I’ll likely make ember-template-compiler itself do the work that ember-cli-htmlbars is doing (for the precompilation not the Broccoli plugin + ember-cli addon bits).
Well I fixed that problem by updating the version of Ember Data I was using to the latest beta. It’s working, but now there’s a warning in the console:
You’re attempting to render a view by passing dataSourceBinding to a view helper without a quoted value, but this syntax is ambiguous. You should either surround dataSourceBinding’s value in quotes or remove Binding from dataSourceBinding.
Awesome, thanks for testing, can you create an issue for this invalid warning? It is caused by a recent refactor I did to the {{each}} helper. I should be able to fix it pretty quickly, but I don’t want to loose track of the problem.
Well, it seems to have been fixed… I did a bower update and I’m not seeing the warning anymore.
This is my current config:
[Debug] DEBUG: Ember : 1.10.0-beta.1+canary.3fd1a25c (vendor.js, line 17456)
[Debug] DEBUG: Ember Data : 1.0.0-beta.12 (vendor.js, line 17456)
[Debug] DEBUG: Handlebars : 2.0.0 (vendor.js, line 17456)
[Debug] DEBUG: jQuery : 1.11.1 (vendor.js, line 17456)