title: Split screen in nested panels (Angular)
body: <p>I want to dynamically split the panels in half, either vertically or horizontally, depending on which of the two buttons is clicked.</p>
  <p>Right now, I am using position absolute to align the panels, calculating the top and left of each new panel according to the ones before it. But as you already guessed, this not scalable and I have problems when I change the resolution.</p>
  <p>When I tried using flexbox I had problems when splitting the panels horizontally.</p>
  <p>Is there any way I can achieve something like in the picture below?</p>
  <p><a href="https://i.stack.imgur.com/QYpx0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QYpx0.png" alt="enter image description here" /></a></p>