How to load page after array is filled? How to load page after array is filled? typescript typescript