ngx-clipboard
- Version 16.0.0
- Published
- 127 kB
- 2 dependencies
- MIT license
Install
npm i ngx-clipboardyarn add ngx-clipboardpnpm add ngx-clipboardOverview
angular 2 clipboard
Index
Classes
Interfaces
Classes
class ClipboardDirective
class ClipboardDirective implements OnInit, OnDestroy {}constructor
constructor( ngZone: NgZone, host: ElementRef<HTMLElement>, renderer: Renderer2, clipboardSrv: ClipboardService);property cbContent
cbContent: string;property cbOnError
cbOnError: EventEmitter<any>;property cbOnSuccess
cbOnSuccess: EventEmitter<IClipboardResponse>;property cbSuccessMsg
cbSuccessMsg: string;property container
container: HTMLElement;property ɵdir
static ɵdir: i0.ɵɵDirectiveDeclaration< ClipboardDirective, '[ngxClipboard]', never, { targetElm: 'ngxClipboard'; container: 'container'; cbContent: 'cbContent'; cbSuccessMsg: 'cbSuccessMsg'; }, { cbOnSuccess: 'cbOnSuccess'; cbOnError: 'cbOnError' }, never, never, false, never>;property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardDirective, never>;property targetElm
targetElm: '' | HTMLInputElement | HTMLTextAreaElement;method ngOnDestroy
ngOnDestroy: () => void;method ngOnInit
ngOnInit: () => void;class ClipboardIfSupportedDirective
class ClipboardIfSupportedDirective implements OnInit {}constructor
constructor( _clipboardService: ClipboardService, _viewContainerRef: ViewContainerRef, _templateRef: TemplateRef<any>);property ɵdir
static ɵdir: i0.ɵɵDirectiveDeclaration< ClipboardIfSupportedDirective, '[ngxClipboardIfSupported]', never, {}, {}, never, never, false, never>;property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardIfSupportedDirective, never>;method ngOnInit
ngOnInit: () => void;class ClipboardModule
class ClipboardModule {}property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardModule, never>;property ɵinj
static ɵinj: i0.ɵɵInjectorDeclaration<ClipboardModule>;property ɵmod
static ɵmod: i0.ɵɵNgModuleDeclaration< ClipboardModule, [typeof i1.ClipboardDirective, typeof i2.ClipboardIfSupportedDirective], [any], [typeof i1.ClipboardDirective, typeof i2.ClipboardIfSupportedDirective]>;class ClipboardService
class ClipboardService {}The following code is heavily copied from https://github.com/zenorocha/clipboard.js
constructor
constructor(ngZone: NgZone, document: any, window: any);property copyResponse$
copyResponse$: Observable<IClipboardResponse>;property document
document: any;property isSupported
readonly isSupported: boolean;property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration< ClipboardService, [null, null, { optional: true }]>;property ɵprov
static ɵprov: i0.ɵɵInjectableDeclaration<ClipboardService>;method configure
configure: (config: ClipboardParams) => void;method copy
copy: (content: string) => void;method copyFromContent
copyFromContent: (content: string, container?: HTMLElement) => boolean;Creates a fake textarea element, sets its value from
textproperty, and makes a selection on it.
method copyFromInputElement
copyFromInputElement: ( targetElm: HTMLInputElement | HTMLTextAreaElement, isFocus?: boolean) => boolean;Attempts to copy from an input
targetElm
method destroy
destroy: (container?: HTMLElement) => void;Remove temporary textarea if any exists.
method isCopySuccessInIE11
isCopySuccessInIE11: () => boolean;This is a hack for IE11 to return
trueeven if copy fails.
method isTargetValid
isTargetValid: (element: HTMLInputElement | HTMLTextAreaElement) => boolean;method pushCopyReponse
pushCopyReponse: (response: IClipboardResponse) => void;Deprecated
use pushCopyResponse instead.
method pushCopyResponse
pushCopyResponse: (response: IClipboardResponse) => void;Pushes copy operation response to copySubject, to provide global access to the response.
Interfaces
interface ClipboardParams
interface ClipboardParams {}property cleanUpAfterCopy
cleanUpAfterCopy?: boolean;interface IClipboardResponse
interface IClipboardResponse {}property content
content?: string;property event
event?: Event;property isSuccess
isSuccess: boolean;property successMessage
successMessage?: string;Package Files (6)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ngx-clipboard.
- Markdown[](https://www.jsdocs.io/package/ngx-clipboard)
- HTML<a href="https://www.jsdocs.io/package/ngx-clipboard"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1364 ms. - Missing or incorrect documentation? Open an issue for this package.
