Jinja2 equivalent for Angular tooling

This is not really about templating.

I have a Python server + webpage which I was using for some feasibility testing, and I now want to start using Angular.

This forced me to switch from the Python server to node, as it is used by the Angular cli.

In the webpage I had some Jinja2 if-else clauses, which would load scripts and static assets from different locations depending on who is requesting the page (either web browser or a mobile app, the mobile app would load them from the app's asset directory). For this the Python server would analyze the user agent and set a variable for Jinja2 to use.

How can I do that with this new non-Python workflow?

I am absolutely new to Angular (I have used AngularJS for many years without a transpiler) and this ng/node workflow.