The frontend runs in the browser, even though it may be docker starting it up.
Therefore the browser is not aware of your docker host-name resolution, and you should use localhost for your apiUrl in your angular application.