Created TileLayer class as
const fl7 = new TileLayer({
url: "***"
});
Added the TileLayer to the basemap as
var map = new Map({
basemap: app.basemap,
layers: [fl7]
});
Created a range-slider as
<div class="slidecontainer">
<input type="range" min="1" max="100" value="50" class="slider" id="myRange">
</div>
Now, how can I change the opacity of the TileLayer using the value obtained from slider?