简体   繁体   中英

Am getting the error “Unknown template object: function” in my ember 1.9.1 app?

I've upgraded my ember version to 1.9.1 and handlebar version to 2.0.0. But now getting the error "Unknown template object: function" in app. The app worked perfectly with ember 1.8.1 and handlebars 1.3.0.

As I suspected, you're not using the correct template compiler for your version of Ember. The grunt-ember-templates readme has instructions on this, but the gist is that you need to point it to the correct template compiler like this:

options: {
    templateCompilerPath: 'bower_components/ember/ember-template-compiler.js',
    handlebarsPath: 'bower_components/handlebars/handlebars.js',
    templateNamespace: 'HTMLBars'
}

You can also look at this pull request for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM