npm install ng-clipngClip - Copy to clipboard using AngularJS
=======
An AngularJS simple directive that uses ZeroClipboard and updates the user's clipboard.
#### Manual Download
Download the from here
#### Bower
```
bower install zeroclipboard ng-clip
#### Npm
``
npm install zeroclipboard ng-clip
#### CDN
ng-clip is available at cdnjs
1. Add ng-clip.js and ZeroClipboard.js to your main file (index.html)
2. Update the .swf path location using ngClipProvider
`javascript`
.config(['ngClipProvider', function(ngClipProvider) {
ngClipProvider.setPath("bower_components/zeroclipboard/dist/ZeroClipboard.swf");
}]);
3. Set ngClipboard as a dependency in your module`
javascript`
var myapp = angular.module('myapp', ['ngClipboard'])
4. Add clip-copy directive to the wanted element, example:
`html`
Copy
5. You can optionally override zeroclipboard config parameters using ngClipProvider
`javascript`
ngClipProvider.setConfig({
zIndex: 50
});
6. You can optionally specify the MIME type by providing using the clip-copy-mime-type attribute:`
html`
Copy HTML
`
7. You can also optionally provide a fallback function that gets called if flash is unavailable:
html`
Copy
If the fallback function is defined to accept an argument named copy`, that argument will be populated with the text to copy.
