Thank you for the suggestion. I've tried changing the priority of blocks by moving the "/admin" block to up but no luck. Still getting the same error. It's trying to connect with the port number.
[error] 18852#18852: *1 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: domain.com, request: "GET /admin/login HTTP/1.1", upstream: "http://127.0.0.1:4200/index.html",
[error] 18852#18852: *1 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: domain.com, request: "GET /admin/login HTTP/1.1", upstream: "http://127.0.0.1:4200/index.html",