Two dependencies- Angular Material & Tailwind are used in this example that you can always remove and replace with your own.
@NgModule({
declarations: [
// ... your declarations
],
imports: [
// ... your imports
ClickToCopyComponent,
],
exports: [
// ... your exports
],
})
export class MyExistingModule {
}
<click-to-copy [text]="app.mySecretKeyToCopy">
{{ app.mySecretKeyToCopy }}
</click-to-copy>
If [text]
is not provided that the component will copy the text part of the element.