ngx-clipboard

  • Version 15.0.1
  • Published
  • 123 kB
  • 2 dependencies
  • MIT license

Install

npm i ngx-clipboard
yarn add ngx-clipboard
pnpm add ngx-clipboard

Overview

angular 2 clipboard

Index

Classes

class ClipboardDirective

class ClipboardDirective implements OnInit, OnDestroy {}

    constructor

    constructor(
    ngZone: any,
    host: any,
    renderer: any,
    clipboardSrv: ClipboardService
    );

      property cbContent

      cbContent: string;

        property cbOnError

        cbOnError: any;

          property cbOnSuccess

          cbOnSuccess: any;

            property cbSuccessMsg

            cbSuccessMsg: string;

              property container

              container: HTMLElement;

                property ɵdir

                static ɵdir: any;

                  property ɵfac

                  static ɵfac: any;

                    property targetElm

                    targetElm: '' | HTMLInputElement | HTMLTextAreaElement;

                      method ngOnDestroy

                      ngOnDestroy: () => void;

                        method ngOnInit

                        ngOnInit: () => void;

                          class ClipboardIfSupportedDirective

                          class ClipboardIfSupportedDirective implements OnInit {}

                            constructor

                            constructor(
                            _clipboardService: ClipboardService,
                            _viewContainerRef: any,
                            _templateRef: any
                            );

                              property ɵdir

                              static ɵdir: any;

                                property ɵfac

                                static ɵfac: any;

                                  method ngOnInit

                                  ngOnInit: () => void;

                                    class ClipboardModule

                                    class ClipboardModule {}

                                      property ɵfac

                                      static ɵfac: any;

                                        property ɵinj

                                        static ɵinj: any;

                                          property ɵmod

                                          static ɵmod: any;

                                            class ClipboardService

                                            class ClipboardService {}
                                            • The following code is heavily copied from https://github.com/zenorocha/clipboard.js

                                            constructor

                                            constructor(ngZone: any, document: any, window: any);

                                              property copyResponse$

                                              copyResponse$: any;

                                                property document

                                                document: any;

                                                  property isSupported

                                                  readonly isSupported: boolean;

                                                    property ɵfac

                                                    static ɵfac: any;

                                                      property ɵprov

                                                      static ɵprov: any;

                                                        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 text property, 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 true even 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 onejsDocs.io badgeto 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
                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](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>