Ken Buja, Thank you for your reply.
Yes it works. I have a related question as follows -
I created TileLayer class as
const fl7 = new TileLayer({
url: "***"
});
Then I added the TileLayer to the basemap as
var map = new Map({
basemap: app.basemap,
layers: [fl7]
});
I 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?
Thanks again!