Function: useCopyToClipboard()
useCopyToClipboard(
text):Promise<boolean>
Defined in: src/core/services/utils.service.ts:269
Copies text to the clipboard (browser only). Returns false on failure
or in non-browser environments (SSR).
Parameters
text
string
The text to copy.
Returns
Promise<boolean>
true if the text was copied, false otherwise.
Example
const ok = await useCopyToClipboard("Hello, world!");
console.log(ok); // true (in a browser with clipboard API)