Handlebars.js parse object instead of [Object object]

前端 未结 5 622
囚心锁ツ
囚心锁ツ 2020-11-27 16:20

I\'m using Handlebars templates and JSON data is already represented in [Object object], how do I parse this data outside of the Handlebars? For example, I\'m trying to popu

5条回答
  •  攒了一身酷
    2020-11-27 16:58

    You are trying to pass templating syntax {{ }} inside a JSON object which is not valid.

    You may need to do this instead:

    myView = new myView({ user : user });

提交回复
热议问题