I start a fresh project with ember-cli, I follow the steps outlined here Ember.js 1.9.0 and 1.10 Beta Released
rm -rf bower_components
bower install --save ember#beta
bower install
npm uninstall --save-dev broccoli-ember-hbs-template-compiler
npm install --save-dev ember-cli-htmlbars
When I try to use the new block syntax it breaks the build and says:
Build failed.
File: ember2/templates/index.hbs
Parse error on line 2:
...}}{{#each model as |post|}} <h3>{{post
----------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'NUMBER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'DATA', 'SEP', got 'INVALID'
Error: Parse error on line 2:
...}}{{#each model as |post|}} <h3>{{post
When I remove the usage of block params, it does build, but when I try to hit any route in the browser, I get a blank screen and an error saying:
Uncaught Error: Assertion Failed: template must be a function. Did you mean to call Ember.Handlebars.compile("...") or specify templateName instead?
Does anybody know what’s wrong?
EDIT
I was informed on github that there is an additional step not mentioned in the blog, adding this config:
EmberENV: {
FEATURES: {
'ember-htmlbars': true
}
},
It works well now.