So ,i'm using a js script to display a widget in my angular component, but i wonder why the widget is displayed in all components instead of only one.
My index.html
<body>
<script>my widget script</script>
</body>
My ts
declare var myWidget: any;
ngOnInit(): void {
var result = new myLivescores.result("<player div ID>", );
}
My template
<div id="<player div ID>" ></div>
If i place the script in the head ,then the widget is dispalyed before my navbar in all components . Can someone help please !!