내가 서버에서 타다 남은 템플릿을 업로드 할 수 있습니다. 나는처럼 사용할 이러한 요구에 대해 알 :Ember. 라이브 업로드 템플릿
$.ajax({
url: 'url_to_template_text',
dataType: 'text',
success: function (resp) {
App.AboutView = Ember.View.extend({
template: Ember.Handlebars.compile(resp)
});
}
});
하지만 페이지에서이보기를 렌더링하는 방법을 이해하지 못할.
<script type="text/x-handlebars" >
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="about">
That text cant be show
</script>
//////JS
$.ajax({
url: 'url_to_template_text',
dataType: 'text',
success: function (resp) {
App.AboutView = Ember.View.extend({
templateName: 'about',
template: Ember.Handlebars.compile(resp)
});
}
});
App.Router.map(function() {
this.route("about", { path: "/" });
});
너무 일을하지 : - App.AboutView.append()는 해당 뷰에 대한 라우팅을 추가 할 경우, 다음 점점 템플릿을 렌더링 할 시간이 없어
근무하지 않습니다. 오래된 템플릿 내용는 제발 도와주세요, 아마 나는 나쁜 방법을 사용 (내가 의미하는 "텍스트가 표시 될 캔트")를 렌더링되어 있습니까?
덕분에, 자사는 나를 위해 일한 –