我的角度应用程序中有一个剑道模式窗口。有时我会在一秒钟后自动关闭窗口。在那些时候,我想隐藏关闭 [x] 按钮,但在其他时候则不然。可以在窗口打开之前完成吗?
if (autoCloseDelay) {
// hide the close [x] button here ??
$timeout( function() {
$scope.modalWindow.close();
}, autoCloseDelay, $scope);
}
$scope.modalWindow.open();
最佳答案
如果您不想使用 CSS,可以使用 setOptions
以编程方式设置操作。
删除关闭
按钮的示例:
// Get current actions
var actions = $scope.modalWindow.options.actions;
// Remove "Close" button
actions.splice(actions.indexOf("Close"), 1);
// Set the new options
$scope.modalWindow.setOptions({ actions : actions });
关于kendo-ui - 如何隐藏剑道模式窗口上的关闭按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27070014/