How to load external template synchronously with backbone

后端 未结 3 1904
猫巷女王i
猫巷女王i 2021-01-16 19:46

I\'m trying to build a mobile application with phonegap, backbone.js and coffeescript. I want to do something like this :

class MyApplication.Views.EntriesIn         


        
3条回答
  •  情话喂你
    2021-01-16 20:05

    i load my templates this way:

             $.ajax({
                url     : 'my/template.tpl',
                async   : false,
                success : function(tpl) {
                    //do something with the template
                }
            });
    

    maybe it`s a solution that works also for you ..

提交回复
热议问题