Angular Wrapper for ZeroClipboard
npm install angular-zeroclipboardAn angular wrapper for ZeroClipboard
``sh`
$ bower install angular-zeroclipboard
or, you can download 'angular-zeroclipboard.js' form 'src' dir manualy.
`js
angular.module('demo', ['zeroclipboard']).
config(['uiZeroclipConfigProvider', function(uiZeroclipConfigProvider) {
// config ZeroClipboard
uiZeroclipConfigProvider.setZcConf({
swfPath: '../bower_components/zeroclipboard/dist/ZeroClipboard.swf'
});
}])
`
Example using a two-way model binding
`html`
Text Copied!
Example using interpolated text:
`html`
zeroclip-text="This was your text: {{ myText }}">Copy
The sentence "This was your text: {{ myText }}" was copied!
Configuration passed into ZeroClipboard.config
`js`
uiZeroclipConfigProvider.setZcConf({
swfPath: '../path/to/ZeroClipboard.swf'
})
If you already have your own configuration and don't want it to be overridden:
`js``
uiZeroclipConfigProvider.setOverrideConfig(false);
The params is an object. and just same as ZeroClipboard official config
MIT @ Leigh Zhu