I'm building an app that has an Angular Google Maps and a button that loads in the root component in this way:
app.component.html
<div #mapContainer id="map"></div>
<a [routerLink]="['/calculation']"><button type="button" class="btn btn-outline-light btn-lg">Calculate</button></a>
<router-outlet></router-outlet>
app.component.css
#map {
top:0; left:0;
position:absolute;
height: 100%;
width: 100%;
margin: 0; padding:0;
}
The button has a route to /calculation, which when clicked, takes the user to a new component. The Angular Google Maps takes the whole page space by using position:absolute. When I click the 'Calculate' button however, the new component loads, but behind the google maps (routing works correctly), making it invisible to the user.
The component I'm trying to route to doesn't have any css, and the html is just text. Is there a simple way to have a component load on top of the Google maps in this situation?