简体   繁体   中英

Rails+Backbone.js - dynamical loading templates for mustache

Hi

Please anyone tell me how to load a mustache template from other file into my backbone script? I'd tried a Ajax but he loads it to me too late and view is already prepared... Anyway... how to load assets/templates/single/index.html.mustache into backbone View and redirect it into View @el element?

Many thanks

Actually, haven't been able to find a gem similar to handlebars_assets for mustache. Maybe something similar for mustache since handlebars is an extension of mustache.

https://github.com/leshill/handlebars_assets

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