in the below posted code i am trying to display a simple map. i referred to openlayer official website and used the code there as mentioned below. the code contains no errors and compiles successfully but there is no map shows up. please let me know how to fix this issue
html:
<a routerLink = "new-cmp">New component</a>
<br />
<br/>
<router-outlet></router-outlet>
<div id="map"></div>
component:
ngOnInit(){
this.map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OSM()
})
],
view: new View({
center: [0, 0],
zoom: 0
})
});
}