Black and blank page when switiching back to main screen

As I am learning angular and ionic, I made a simple app. The problem is - when switching to the other page via menu, and then going back to homepage - it’s black for a few moments, then app refreshes and loads the proper background. How to prevent this? It ruins the experience.