我试图将此ajax转换为指令。下面的代码打开一个带有新路径的模态窗口:
<div id="window" style="margin-left: 20px; margin-right: 20px;"></div>
<span id="undo" class="k-button">Click here to open the window.</span>
<script>
$(document).ready(function() {
var window = $("#window"),
undo = $("#undo")
.bind("click", function() {
window.kendoWindow({
actions: ["Custom", "Pin", "Refresh", "Maximize", "Minimize", "Close"],
modal: true,
pinned: false,
resizable: false,
width: "900px",
height: "770px",
content: "http://localhost/WebInvoice/Dev/#/client?mp=b"
}).data("kendoWindow").center().open();
});
});
</script>