Я пытаюсь загрузить html-шаблон для сетки редактируемое всплывающее окно внутри угловое приложение.kendo ui сетка редактируемые всплывающие окна из удаленных шаблонов
внутри страницы HTML я добавил этот
<script>
var templateLoader = (function($,host){
//Loads external templates from path and injects in to page DOM
return{
loadExtTemplate: function(path){
var tmplLoader = $.get(path)
.success(function(result){
//Add templates to DOM
$("body").append(result);
})
.error(function(result){
alert("Error Loading Templates -- TODO: Better Error Handling");
});
tmplLoader.complete(function(){
$(host).trigger("TEMPLATE_LOADED", [path]);
});
}
};
})(jQuery, document);
/*
** Load the template file
*/
templateLoader.loadExtTemplate("tpl/Maintenance/policyProp.htm");
/*
** Loading external templates with in this function.
*/
</script>
внутри сетки:
editable: {
confirmation: true,
mode: "popup",
template: kendo.template($("#Policy_editor").html())
},
страница HTM:
<script type="text/x-kendo-template" id="Policy_editor" >
html code here
.
.
.
.
</script>
я хочу "#Policy_editor", чтобы исходить от внешняя страница html. Спасибо за помощь!
большое спасибо !, вы мне очень помогли :) – user2095120
@ user2095120 он работает? – DontVoteMeDown