Adding a resolve to angular route to not switch templates unless the api calls resolve without redirect. Makes it look cleaner