How to pass data from an angular service to an external JS lib?

In the angular project I have a service that makes call into server to get login in and get back a bearer TOKEN that will be used to call to web services.

In fact, I’m using external JavaScript lib, I made some change on the lib (adding new methods the make calls to some api on order servers using that TOKEN).

What I did not figure out here, is how to pass that TOKEN from the angular service to this external JS lib?

any help is much appreciated.

Hello!

Why do you need the library to be external to your Angular app? I mean, couldn’t you import it inside any of your services (the one in charge of the login, for instance)?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.