Help using Widgets with Ionic for a beginner

I have a recurring issue I am running into with ionic and that is bringing in widgets to my app. In this case, I am using this weather map from https://windy.app/widgets. With the code

<div
data-windywidget="map"
data-spotid="395499"
data-appid="bab357a22953d3068054a2dc5d3dea27"
data-newwindbar="true"
data-spots="true">
</div>
<script async="true" data-cfasync="false" type="text/javascript" src="https://windy.app/widget3/windy_map_async.js"></script>

I can’t get this code to display anywhere outside of the index.html due to the script. This has been a recurring issue with every piece of code with a script I want this to run on a specific HTML page for displaying weather but the code won’t display in any other HTML file than the index.html due to the script. Is there just something really obvious I am missing? As after a lot of research I cant find much on this issue.