Home > Net >  How to embed a widget in angular
How to embed a widget in angular

Time:12-26

I have got a script tag of a widget to embed in my website ,

<script type="text/javascript" src="https://widget.enetscores.com/FWA003AAB2AA750CFB"></script>

But on adding it to my template nothing appears. Can somebody help please

CodePudding user response:

Just a wild guess, you're missing the part like below (the id is arbitrary in the below example)

<div id="enetscores-widget"></div>

Such widgets in most cases require a placeholder with a specific id that's used to render a widget.

Check the API documentation for the widgets that you want to use.

CodePudding user response:

use Iframe if it's a independent widget inside you app.

or you can try HTML custom element injection (this works in latest browser)

or you can have a look at this the Angular way of making small widgets and using in another App

https://angular.io/guide/elements

  • Related