It involves both because the spermatogonia/ oogonia first have to undergo mitosis. See the logic behind this is, if all the cells undergo meiosis to produce more gametes, then the meiocytes will be finished after some time, so obviously they first need to increase their own number by mitosis!
I hope you have understood!