What's the best way to integrate Calendly widget directly into Angular 9 project?

I’m having trouble getting Calendly to work inside my Angular 9 application.

I want to add the inline Calendly booking widget to one of my components but I keep running into issues. I’ve searched online but most examples are for older Angular versions or just don’t work properly.

Has anyone successfully implemented Calendly inline embedding in Angular 9? What approach did you use? Do I need to install any specific packages or just use the standard JavaScript embed code?

I’ve tried following the official documentation but the widget either doesn’t load at all or throws console errors. Any step-by-step guidance would be really helpful!

Thanks for any suggestions or working examples you can share.

try doing npm install @types/calendly first, then add the script tag to your index.html. in your component, declare declare var Calendly: any; and call Calendly.initInlineWidget() in ngAfterViewInit. it worked for me after some trial and error.