我正在使用kendo制作一个角度为1的响应式模态窗口。
这是我的主要html文件:
<html>
<head>
<link rel="stylesheet" href="styles/kendo.common.min.css" />
<link rel="stylesheet" href="styles/kendo.default.min.css" />
<link rel="stylesheet" href="styles/kendo.default.mobile.min.css" />
<script src="scripts/jquery.min.js"></script>
<script src="scripts/kendo.all.min.js"></script>
<script src="scripts/angular.min.js"></script>
</head>
<body ng-app="myModule" ng-controller="myController">
<button data-ng-click="showPopUp()">My Button</button>
<div id="dialog">
</div>
<script>
$("#dialog").kendoWindow({
visible: false,
actions: ["Close"],
draggable: true,
height: "20%",
modal: true,
pinned: true,
position: {
top: 200,
left: 200
},
resizable: false,
title: "Modal Window",
width: "50%",
content: "file:///C:/Users/adish/Desktop/New folder/passwordChangeWindow.html"
});
angular.module("myModule",[]);
angular.module("myModule").controller("myController",myController);
function myController($scope){
$scope.showPopUp = function(){
var dialog = $("#dialog").data("kendoWindow");
dialog.open();
}
$scope.changeUserPassowrd = function(){
alert("function called");
}
}
</script>
</body>
</html>
以下是包含模态窗口内容的html文件:
div>
<button class="k-button ok-button" data-ng-click="changeUserPassowrd(curPass,newPass,confirmPass,'na')">Ok</button>
</div>
但是当我单击模态窗口中的ok按钮时,不会调用控制器中的函数。
这对我的工作方式如下:
<div kendo-window="win2" k-title="helpTitle"
k-width="600" k-height="200" k-visible="false"
k-content="..."
k-on-open="win2visible = true" k-on-close="win2visible = false"></div>
</div>
但是我无法以百分比给出高度和宽度。请指导我这个问题。