TypeError applying precompiled Handlebars templates with a context

后端 未结 2 1922
时光说笑
时光说笑 2020-12-15 05:19

Pardon the noob question but I simply can\'t get precompiled Handlebars templates to do anything but barf out

TypeError: \'undefined\' is not a functi

2条回答
  •  天涯浪人
    2020-12-15 06:21

    The problem for me is that currently (June 2014), the 2.0 release on GitHub is marked alpha https://github.com/wycats/handlebars.js/releases.

    If I install handlebars via bower, it selects the latest stable release. v1.3.0.

    npm install handlebars, however, installs the ~2.0.0-alpha.4 version.

    Solution: update the version in bower.json to ~2.0.*, and run bower update.

提交回复
热议问题