What is the best way to change the place of each box in Angular

I have two boxes(Box 1- Box 2), want to change the place of each box after clicking on the button

[each box is a component] enter image description here

After clicking

enter image description here

Source: Angular Questions