{"id":19957233,"url":"https://github.com/jsdaddy/ngx-copypaste","last_synced_at":"2025-04-28T10:46:48.062Z","repository":{"id":34457980,"uuid":"178838855","full_name":"JsDaddy/ngx-copypaste","owner":"JsDaddy","description":"A pure and awesome copy  paste directive for Angular","archived":false,"fork":false,"pushed_at":"2024-11-29T14:29:33.000Z","size":11177,"stargazers_count":29,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-04-11T18:17:58.548Z","etag":null,"topics":["angular","angular-clipboard","angular-copypaste","clipboard","copypaste","ngx","ngx-clipboard","ngx-copypaste","typescript"],"latest_commit_sha":null,"homepage":"https://jsdaddy.github.io/ngx-copypaste/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JsDaddy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-01T10:21:19.000Z","updated_at":"2025-02-24T10:00:47.000Z","dependencies_parsed_at":"2024-01-29T12:04:35.799Z","dependency_job_id":"7aea5f5b-6d6b-4514-9885-a92dd3c10406","html_url":"https://github.com/JsDaddy/ngx-copypaste","commit_stats":{"total_commits":146,"total_committers":12,"mean_commits":"12.166666666666666","dds":0.5753424657534247,"last_synced_commit":"615724d4ed313c255a879046fd82ac9c3fefb787"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsDaddy%2Fngx-copypaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsDaddy%2Fngx-copypaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsDaddy%2Fngx-copypaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JsDaddy%2Fngx-copypaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JsDaddy","download_url":"https://codeload.github.com/JsDaddy/ngx-copypaste/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251298060,"owners_count":21566946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-clipboard","angular-copypaste","clipboard","copypaste","ngx","ngx-clipboard","ngx-copypaste","typescript"],"created_at":"2024-11-13T01:37:00.974Z","updated_at":"2025-04-28T10:46:48.037Z","avatar_url":"https://github.com/JsDaddy.png","language":"TypeScript","readme":"\u003ca href=\"http://jsdaddy.io/img/logo.png\"\u003e\n  \u003ch1 align=\"center\"\u003eNGX COPYPASTE\u003c/h1\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  NGX COPYPASTE is the best directive to copy any content on any element\n\u003c/p\u003e\n\n[![CI](https://github.com/JsDaddy/ngx-copypaste/actions/workflows/quality-check.yml/badge.svg?branch=develop)](https://github.com/JsDaddy/ngx-copypaste/actions/workflows/main.yml)\n[![npm](https://img.shields.io/npm/v/ngx-copypaste.svg)](https://www.npmjs.com/package/ngx-copypaste)\n[![npm downloads](https://img.shields.io/npm/dt/ngx-copypaste.svg)](https://npmjs.org/ngx-copypaste)\n\n[![npm](https://img.shields.io/npm/dm/ngx-copypaste.svg)](https://www.npmjs.com/package/ngx-copypaste)\n\n[![GitHub contributors](https://img.shields.io/github/contributors/JSDaddy/ngx-copypaste.svg?style=flat)](https://github.com/JSDaddy/ngx-copypaste)\n\n[![GitHub stars](https://img.shields.io/github/stars/JSDaddy/ngx-copypaste.svg?label=GitHub%20Stars\u0026style=flat)](https://github.com/JSDaddy/ngx-copypaste)\n\nYou can also try our NGX MASK [check](https://www.npmjs.com/package/ngx-mask) it.\nYou can also try our NGX LOADER INDICATOR [check](https://www.npmjs.com/package/ngx-loader-indicator) it.\n\n### You can try live [demo](https://jsdaddy.github.io/ngx-copypaste/) with examples.\n\n## Installing\n\n```bash\n$ npm install --save ngx-copypaste\n```\n\n## Quickstart if ngx-copypaste version \u003e= 15.0.0\n\nPay attention this version works for angular \u003e= 14.0.0\n\nImport **ngx-copypaste** directive to your standalone component\n\n```typescript\n@Component({\n  selector: 'ngx-component',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss'],\n  standalone: true,\n  imports: [\n    (...)\n    NgxCopyPasteDirective,\n    (...)\n  ],\n})\nexport class AppComponent {\n    (...)\n}\n```\n\n## Quickstart if ngx-copypaste version \u003c 15.0.0\n\nPay attention this version works for angular \u003c 15.0.0\n\nImport **ngx-copypaste** module in Angular app.\n\n```typescript\nimport {NgxCopyPasteModule} from 'ngx-copypaste'\n\n(...)\n\n@NgModule({\n  (...)\n  imports: [\n    NgxCopyPasteModule\n  ]\n  (...)\n})\n```\n\n#### Usage\n\nFrom input\n\n```html\n\u003cinput type=\"text\" ngxCopyPaste #cp=\"copy\" /\u003e\n\n\u003cbutton (click)=\"cp.copy()\"\u003eCopy\u003c/button\u003e\n```\n\nFrom any HTML tag\n\n```html\n\u003cp ngxCopyPaste #cp=\"copy\"\u003eLorem ipsum\u003c/p\u003e\n\n\u003cbutton (click)=\"cp.copy()\"\u003eCopy\u003c/button\u003e\n```\n\nFrom complex div\n\n```html\n\u003cdiv ngxCopyPaste #cp=\"copy\"\u003e\n    \u003ch1\u003eLorem ipsum\u003c/h1\u003e\n    \u003cp\u003e\n        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam rutrum augue at ante\n        sollicitudin posuere. Pellentesque congue consequat enim quis luctus.\n    \u003c/p\u003e\n    \u003cdiv\u003e\n        \u003ch2\u003eLorem ipsum\u003c/h2\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\n\u003cbutton (click)=\"cp.copy()\"\u003eCopy\u003c/button\u003e\n```\n\nAlso you can bind it to any tag\n\n```html\n\u003cp ngxCopyPaste #cp=\"copy\"\u003eLorem ipsum\u003c/p\u003e\n\n\u003cp (click)=\"cp.copy()\"\u003eCopy\u003c/p\u003e\n```\n\nOutput success cb\n\n```html\n\u003cp ngxCopyPaste #cp=\"copy\" (successCb)=\"copy()\"\u003eLorem ipsum\u003c/p\u003e\n\n\u003cp (click)=\"cp.copy()\"\u003eCopy\u003c/p\u003e\n\npublic copy(): void { your code }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdaddy%2Fngx-copypaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsdaddy%2Fngx-copypaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdaddy%2Fngx-copypaste/lists"}