12
밑줄의 외부 템플릿
나는 밑줄 템플릿을 사용 합니다. 외부 파일을 템플릿 으로 첨부 할 수 있습니까? Backbone View에는 다음이 있습니다. textTemplate: _.template( $('#practice-text-template').html() ), initialize: function(){ this.words = new WordList; this.index = 0; this.render(); }, 내 HTML은 다음과 같습니다. <script id="practice-text-template" type="text/template"> <h3>something code</h3> </script> 잘 작동한다. 하지만 외부 템플릿이 필요합니다 . 나는 …