How to generate a script to open in another website ?
✅ 1. Expose your chatbot via URL
Ensure your chatbot is accessible via a public route like:
Or if it’s in a component:
✅ 2. Create an embeddable script
Make a JS snippet that other websites can paste:
🔧 Example embed.js
✅ 3. Host that script on your server
Place embed.js
in your Angular app’s assets
folder and serve it:
Access it via:
✅ 4. Add the script to another website
The owner of the other website just needs to include this in their HTML:
✅ 5. (Optional) Add a toggle button
If you don’t want the iframe always visible, create a toggle:
Update embed.js
How to generate a script to open in another website ?
Reviewed by Bugs Solutions
on
April 21, 2025
Rating:
No comments