Is it possible to load a Handlebars template via Ajax?

前端 未结 3 596
闹比i
闹比i 2020-12-02 23:36

I would like to load additional templates on the fly. Is it possible?

3条回答
  •  旧时难觅i
    2020-12-03 00:42

    I am using requirejs along with text plugin to load handlebar templates dynamically.

    r.js optimizer will compile the handlerbar template to text file, which can be loaded easily using requirejs or even ajax

提交回复
热议问题