timdeschryver / timdeschryver.dev

https://timdeschryver.dev
54 stars 30 forks source link

Use the new Angular Clipboard CDK to interact with the clipboard #125

Closed utterances-bot closed 1 year ago

utterances-bot commented 1 year ago

Use the new Angular Clipboard CDK to interact with the clipboard - Tim Deschryver

The new Angular Material release brings us a new CDK clipboard module to interact with the clipboard. In this post, we'll explore how to use the new Clipboard CDK by going over some examples.

https://timdeschryver.dev/blog/use-the-new-angular-clipboard-cdk-to-interact-with-the-clipboard

aboudard commented 1 year ago

Hello Tim ! Just a quick message to tell you that the ClipBoard directive [cdkCopyToClipboard] did completely mess one of my apps, specifically when I added an Action$ listener in the component using the ClipBoard. Resulting an andless error loop... I ultimately removed my Action$ listener and replaced with a simple boolean Store selector, and used the ClipBoard service instead of the directive ... that was scary :( From what I can tell, one of my Effects is launching a Toast, and it ended up called multiple times, but I didn't figure it all out. Cheers !

timdeschryver commented 1 year ago

That's weird 👀, thanks for the info @aboudard !