Skip to content

Commit 3878fbe

Browse files
author
Will Fairclough
committed
Added onError use to demo page.
1 parent 0fc6c31 commit 3878fbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

demo/demo.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
$scope.$watch('input', function(v) {
2626
$scope.copied = false
2727
});
28+
29+
$scope.clipError = function(e) {
30+
console.log('Error: ' + e.name + ' - ' + e.message);
31+
};
2832
}]);
2933
</script>
3034
</head>
@@ -36,7 +40,7 @@ <h1>Angular ZeroClipboard Demo</h1>
3640
<div>
3741
<h1>Copy from input</h1>
3842
<label for="">input: <input type="text" ng-model="input" id="input1"></label>
39-
<button ui-zeroclip zeroclip-copied="complete($event)" zeroclip-model="input" >Copy</button>
43+
<button ui-zeroclip zeroclip-copied="complete($event)" zeroclip-on-error="clipError($event)" zeroclip-model="input" >Copy</button>
4044
<span ng-show="copied">Copied!</span>
4145
</div>
4246

0 commit comments

Comments
 (0)