Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export 'reset' (imported as 'confetti') was not found in 'canvas-confetti' (possible exports: create, default) #240

Open
albertB4work opened this issue Nov 15, 2024 · 0 comments

Comments

@albertB4work
Copy link

Only tried to use the api in my app-component html using this guide for angular projects with npm.
https://akhilabhinav.medium.com/how-to-use-canvas-confetti-in-angular-to-create-awesome-animations-48dfff650b0c

Any clue?

celebrate() {
      const duration = 3000; // in milliseconds
      confetti({
        particleCount: 100,
        spread: 160,
        origin: { y: 0.6 },
      });
      // Clear confetti after a certain duration
      setTimeout(() => confetti.reset(), duration);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant