
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
An AngularJS simple directive that uses ZeroClipboard and updates the user's clipboard.
Download the from here
bower install zeroclipboard ng-clip
npm install zeroclipboard ng-clip
ng-clip is available at cdnjs
Add ng-clip.js and ZeroClipboard.js to your main file (index.html)
Update the .swf path location using ngClipProvider
.config(['ngClipProvider', function(ngClipProvider) {
ngClipProvider.setPath("bower_components/zeroclipboard/dist/ZeroClipboard.swf");
}]);
ngClipboard
as a dependency in your modulevar myapp = angular.module('myapp', ['ngClipboard'])
<a href="" clip-copy="getTextToCopy()" clip-click="doSomething()">Copy</a>
ngClipProvider.setConfig({
zIndex: 50
});
clip-copy-mime-type
attribute:<a href="" clip-click"getHtmlToCopy()" clip-copy-mime-type="text/html">Copy HTML</a>
<a href="" clip-click-fallback="fallback(copy)" clip-copy="getTextToCopy()" clip-click="doSomething()">Copy</a>
If the fallback function is defined to accept an argument named copy
, that argument will be populated with the text to copy.
You can check out this live example here: http://plnkr.co/xwV5Yn see the examples folder for more
FAQs
Copy to clipboard using AngularJS
The npm package ng-clip receives a total of 2,841 weekly downloads. As such, ng-clip popularity was classified as popular.
We found that ng-clip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.