gpt4 book ai didi

angularjs - AngularJS 的数字签名

转载 作者:行者123 更新时间:2023-12-04 14:00:04 35 4
gpt4 key购买 nike

关闭。这个问题需要更多 focused .它目前不接受答案。












想改进这个问题?更新问题,使其仅关注一个问题 editing this post .

5年前关闭。




Improve this question




我正在使用 MEAN 堆栈,我想使用表单为员工实现数字签名,但我找不到任何关于此主题的库或教程。

有人做过吗?这样做的正确方法是什么?

最佳答案

谢谢你的问题vonwolf!我找到了另一个解决方案检查这个:

https://github.com/legalthings/angular-signature

但是,我尝试使用上面的方法实现一个简单的示例,但是我在控制台中看到了我无法解决的错误。我做了同样的 ng-signature-pad,它工作得很好,没有任何错误。

Simple example using angular-signature Control

<!DOCTYPE html>
<html>

<head>
<title>Sample angular-singature</title>
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
<script src="https://cdn.rawgit.com/legalthings/angular-signature/master/src/signature.js"></script>
<script src="https://cdn.rawgit.com/szimek/signature_pad/master/signature_pad.js"></script>
<style>
.nowrap {
white-space:pre-wrap;
word-wrap:break-word;
}
</style>
</head>

<body ng-app='app' ng-controller='SignModalCtrl'>
<h1>Angular Signature Sample</h1>
<signature-pad accept="accept" clear="clear" height="220" width="568"></signature-pad>
<button ng-click="clear()">Clear signature</button>
<button ng-click="doAccept()">Sign</button>
<pre class='nowrap' ng-bind="accept().dataUrl"></pre>
<script>
var app = angular.module('app', [
'signature',
]);
app.controller('SignModalCtrl', [
'$scope',
function($scope) {
$scope.doAccept = function () {
var signature = $scope.accept();
console.log('doAccpet', signature)
}
$scope.done = function() {
var signature = $scope.accept();

if (signature.isEmpty) {
$modalInstance.dismiss();
} else {
$modalInstance.close(signature.dataUrl);
}
};
}
]);
</script>
</body>

</html>

And, here is the other simple example using ng-signature-pad

此外,您还可以找到其他解决方案:

https://www.sitepoint.com/4-jquery-digital-signature-plugins/

塔雷克

关于angularjs - AngularJS 的数字签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25813186/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com