Dynamically Include External Script

Hello! I have to integrate with a third-party API that requires a <script> include of their helper library. The thing is, I only need their tool on two of the routes in my app. As such, I don’t want to just add the <script> include to the app template (index.html) because then their JS library would be included on all app routes. For performance reasons, this is an undesirable approach.

What is the best way to approach this problem? Thanks in advance!