Fixes for Angular (part of Rebuild of Work Packages/Timelines UI)

**This should be merged immediately before opf/openproject#1149.**

https://www.openproject.org/work_packages/4560