0
所以我一直在想,如果我將所有模板寫入單個文件,Ember會在加載應用程序時立即加載所有這些模板嗎?Emberjs:一次加載所有模板
說,我這index.html
<! -- Added all dependecies of Ember -->
<script type="text/x-handlebars" >
This is application template
</script>
<script type="text/x-handlebars" id="about">
This is about template
</script>
而且我的application.js
App = Ember.Application.create();
App.Router.map(function(){
this.resouce('about');
});
所以,可以說,我訪問index.html
所以是about
模板已經加載在這個時候? ,我的意思是我自然假設它是GET
頁面index.html
並從中提取句柄模板,因此應用程序啓動時應該加載index.html
中定義的所有模板。這是正確的嗎? ,將不同的模板潛入不同的文件將糾正這一點?