Looking for a simple way to vertically align my Angular component on display?
I have set the main container using display: grid
.
Check out the solution on stackblitz
clock.component.html
<div class="container">
{{time | date: 'HH:mm:ss'}}
</div>
clock.component.css
:host {
margin: auto;
}
app.component.html
<div class="container">
<app-clock></app-clock>
</div>
app.component.css
.container {
display: grid;
height: 100%;
}