Socket
Book a DemoInstallSign in
Socket

@ngodings/ngx-copy

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngodings/ngx-copy

Simple copy from text, value input & text inside element in Angular

15.0.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@ngodings/ngx-copy

Simple copy from text, value input & text inside element in Angular

Demo - Angular v15

https://npm.ngodings.com/packages/ngx-copy

Support Me

If you like this package I will be happy that you support me on Buy me a coffee :)
Buy me coffee: https://www.buymeacoffee.com/alidihaw
Indonesia People: https://sociabuzz.com/dihaw

Getting Started

Installing and Importing

Install the package by command:

 npm install @ngodings/ngx-copy --save

Import the module

import { NgxCopyDirective } from "@ngodings/ngx-copy";

@NgModule({
    imports: [
        ...
        NgxCopyDirective
    ],
    declarations: [...],
    providers: [...]
})
export class AppModule {}

Usage

From input

<input type='text' ngxCopy #cp="copy"/>

<button (click)="cp.copy()">Copy</button>

From any HTML tag

<p ngxCopy #cp="copy">Lorem ipsum</p>

<button (click)="cp.copy()">Copy</button>

From complex div

<div ngxCopy #cp="copy">
  <h1>Lorem ipsum</h1>
  <p>Lorem ipsum dolor sit amet, consectetur 
  adipiscing elit.
 Nullam rutrum augue at ante sollicitudin posuere.
 Pellentesque congue consequat enim quis luctus.</p>
  <div>
    <h2>Lorem ipsum</h2>
  </div>
</div>

<button (click)="cp.copy()">Copy</button>

Also you can bind it to any tag

<p ngxCopy #cp="copy">Lorem ipsum</p>

<p (click)="cp.copy()">Copy</p>

Development

Prepare your environment

  • Install Node.js and NPM
  • Install local dev dependencies: npm install while current directory is this repo

License

MIT @ Ali Abdul Wahid

Keywords

ngx

FAQs

Package last updated on 27 Dec 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.