Ionic 5 was announced a few hours ago (12th Feb 2020) and I upgraded my one of the small production app to Ionic 5 along with Angular 9:
For Angular: Stopping the terminal and re-serve it ng serve solved the problem for me.
ng serve